diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-01-31 19:52:08 -0800 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-02-01 19:40:39 -0800 |
commit | 469cd9582fdb10578fc6aa6561e0acdbe32ddacd (patch) | |
tree | d505dea98046f45dad8eca8d500e2b9a90dd0dd9 /src/command | |
parent | bc6eca2115d8d333eed61d23a01958926bbd7a9c (diff) |
[clang-tidy] use make_unique
Found with modernize-make-unique
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/DatabaseCommands.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index c87088611..174144a47 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -227,7 +227,7 @@ handle_list_file(Client &client, Request args, Response &r) std::unique_ptr<SongFilter> filter; if (!args.empty()) { - filter.reset(new SongFilter()); + filter = std::make_unique<SongFilter>(); try { filter->Parse(args, false); } catch (...) { @@ -272,8 +272,8 @@ handle_list(Client &client, Request args, Response &r) return CommandResult::ERROR; } - filter.reset(new SongFilter(TAG_ARTIST, - args.shift())); + filter = std::make_unique<SongFilter>(TAG_ARTIST, + args.shift()); } while (args.size >= 2 && @@ -302,7 +302,7 @@ handle_list(Client &client, Request args, Response &r) tag_types.emplace_back(tagType); if (!args.empty()) { - filter.reset(new SongFilter()); + filter = std::make_unique<SongFilter>(); try { filter->Parse(args, false); } catch (...) { |