return by braced init list
shorter Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -278,5 +278,5 @@ Directory::Walk(bool recursive, const SongFilter *filter,
|
||||
LightDirectory
|
||||
Directory::Export() const noexcept
|
||||
{
|
||||
return LightDirectory(GetPath(), mtime);
|
||||
return {GetPath(), mtime};
|
||||
}
|
||||
|
||||
@@ -250,11 +250,11 @@ UpnpDatabase::SearchSongs(const ContentDirectoryService &server,
|
||||
{
|
||||
const SongFilter *filter = selection.filter;
|
||||
if (selection.filter == nullptr)
|
||||
return UPnPDirContent();
|
||||
return {};
|
||||
|
||||
const auto searchcaps = server.getSearchCapabilities(handle);
|
||||
if (searchcaps.empty())
|
||||
return UPnPDirContent();
|
||||
return {};
|
||||
|
||||
std::string cond;
|
||||
for (const auto &item : filter->GetItems()) {
|
||||
|
||||
@@ -34,7 +34,7 @@ UpdateQueueItem
|
||||
UpdateQueue::Pop() noexcept
|
||||
{
|
||||
if (update_queue.empty())
|
||||
return UpdateQueueItem();
|
||||
return {};
|
||||
|
||||
auto i = std::move(update_queue.front());
|
||||
update_queue.pop_front();
|
||||
|
||||
Reference in New Issue
Block a user