diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index ade6a9362..50024a71e 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -74,14 +74,13 @@ ParseSortTag(const char *s) static CommandResult handle_match(Client &client, Request args, Response &r, bool fold_case) { - RangeArg window; + RangeArg window = RangeArg::All(); if (args.size >= 2 && StringIsEqual(args[args.size - 2], "window")) { window = args.ParseRange(args.size - 1); args.pop_back(); args.pop_back(); - } else - window.SetAll(); + } TagType sort = TAG_NUM_OF_ITEM_TYPES; bool descending = false; diff --git a/src/protocol/RangeArg.hxx b/src/protocol/RangeArg.hxx index 3eca8a75e..e6a8de8ff 100644 --- a/src/protocol/RangeArg.hxx +++ b/src/protocol/RangeArg.hxx @@ -27,11 +27,6 @@ struct RangeArg { unsigned start, end; - void SetAll() { - start = 0; - end = std::numeric_limits::max(); - } - static constexpr RangeArg All() { return { 0, std::numeric_limits::max() }; }