summaryrefslogtreecommitdiff
path: root/src/util/OptionParser.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-17 11:14:57 +0100
committerMax Kellermann <max@musicpd.org>2018-01-17 11:14:57 +0100
commit3e2e0d062b3e296d3e25897114c8646c9f664f52 (patch)
tree3a6756aa5da54f4e987a148ef4d612edf08e70bd /src/util/OptionParser.hxx
parentc45fe3517c5ac8bf761cc8d862ce3d90af272eec (diff)
util/OptionParser: support option values
Diffstat (limited to 'src/util/OptionParser.hxx')
-rw-r--r--src/util/OptionParser.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/OptionParser.hxx b/src/util/OptionParser.hxx
index a7176a4c3..a6a95a325 100644
--- a/src/util/OptionParser.hxx
+++ b/src/util/OptionParser.hxx
@@ -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