protocol/ArgParser: move struct RangeArg to separate header

This commit is contained in:
Max Kellermann
2018-09-02 07:45:45 +02:00
parent b9cca49e14
commit 68f824a186
8 changed files with 47 additions and 15 deletions

View File

@@ -22,10 +22,9 @@
#include "check.h"
#include <limits>
#include <stdint.h>
struct RangeArg;
class SongTime;
class SignedSongTime;
@@ -38,19 +37,6 @@ ParseCommandArgInt(const char *s, int min_value, int max_value);
int
ParseCommandArgInt(const char *s);
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() };
}
};
RangeArg
ParseCommandArgRange(const char *s);