diff options
author | Sebastian Thorarensen <sebth@naju.se> | 2013-10-19 15:38:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 16:11:33 +0200 |
commit | d6553fc6a73ce458aa1fabe78dbb45b5b6a1ac12 (patch) | |
tree | ca5c0edbd15afdb8d11b9a1268c9b0df37776887 /src/ConfigData.hxx | |
parent | fc9014f7ecb486288b8f7d0d376f68b27f60dd6f (diff) | |
download | mpd-d6553fc6a73ce458aa1fabe78dbb45b5b6a1ac12.tar.gz mpd-d6553fc6a73ce458aa1fabe78dbb45b5b6a1ac12.tar.xz mpd-d6553fc6a73ce458aa1fabe78dbb45b5b6a1ac12.zip |
ConfigData: Add support for signed integers
Now config_param::GetBlockValue() can be used to get signed integers
from the configuration.
Diffstat (limited to 'src/ConfigData.hxx')
-rw-r--r-- | src/ConfigData.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ConfigData.hxx b/src/ConfigData.hxx index d85228cc3..b41b27420 100644 --- a/src/ConfigData.hxx +++ b/src/ConfigData.hxx @@ -46,6 +46,9 @@ struct block_param { :name(_name), value(_value), line(_line), used(false) {} gcc_pure + int GetIntValue() const; + + gcc_pure unsigned GetUnsignedValue() const; gcc_pure @@ -115,6 +118,9 @@ struct config_param { AllocatedPath GetBlockPath(const char *name, Error &error) const; gcc_pure + int GetBlockValue(const char *name, int default_value) const; + + gcc_pure unsigned GetBlockValue(const char *name, unsigned default_value) const; gcc_pure |