diff options
Diffstat (limited to 'src/Option.cc')
| -rw-r--r-- | src/Option.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Option.cc b/src/Option.cc index 96576b83..35e4a35c 100644 --- a/src/Option.cc +++ b/src/Option.cc @@ -50,3 +50,12 @@ int Option::getAsInt(const string& name) const { return (int)strtol((*itr).second.c_str(), NULL, 10); } } + +long long int Option::getAsLLInt(const string& name) const { + map<string, string>::const_iterator itr = table.find(name); + if(itr == table.end()) { + return 0; + } else { + return (int)strtoll((*itr).second.c_str(), NULL, 10); + } +} |
