util/OptionParser: support option values

This commit is contained in:
Max Kellermann
2018-01-17 11:14:57 +01:00
parent c45fe3517c
commit 3e2e0d062b
3 changed files with 57 additions and 10 deletions

View File

@@ -47,6 +47,7 @@ public:
struct Result {
int index;
const char *value;
constexpr operator bool() noexcept {
return index >= 0;
@@ -70,7 +71,8 @@ public:
}
private:
Result IdentifyOption(const char *s) const;
const char *CheckShiftValue(const char *s, const OptionDef &option);
Result IdentifyOption(const char *s);
};
#endif