ConfigData: Add support for signed integers

Now config_param::GetBlockValue() can be used to get signed integers
from the configuration.
This commit is contained in:
Sebastian Thorarensen
2013-10-19 15:38:50 +02:00
committed by Max Kellermann
parent fc9014f7ec
commit d6553fc6a7
2 changed files with 27 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ struct block_param {
block_param(const char *_name, const char *_value, int _line=-1)
:name(_name), value(_value), line(_line), used(false) {}
gcc_pure
int GetIntValue() const;
gcc_pure
unsigned GetUnsignedValue() const;
@@ -114,6 +117,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;