Commit 590687fd authored by Max Kellermann's avatar Max Kellermann

protocol/RangeArg: eliminate SetAll()

parent 993f8d6a
......@@ -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;
......
......@@ -27,11 +27,6 @@
struct RangeArg {
unsigned start, end;
void SetAll() {
start = 0;
end = std::numeric_limits<unsigned>::max();
}
static constexpr RangeArg All() {
return { 0, std::numeric_limits<unsigned>::max() };
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment