protocol/RangeArg: eliminate SetAll()
This commit is contained in:
parent
993f8d6a5e
commit
590687fdea
@ -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() };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user