diff options
author | lloyd <[email protected]> | 2008-11-09 22:58:31 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-09 22:58:31 +0000 |
commit | 31a1b12011e6d14f15b643b5ffde67d9df526e8d (patch) | |
tree | d0faff92dd1d7c1c92952744bdfa541d9dbb263e | |
parent | 986f88320c05cc8ab064451858af3c1f949e89fa (diff) |
Constify
-rw-r--r-- | src/utils/scan_name.cpp | 4 | ||||
-rw-r--r-- | src/utils/scan_name.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/scan_name.cpp b/src/utils/scan_name.cpp index 3590ffd31..91d017811 100644 --- a/src/utils/scan_name.cpp +++ b/src/utils/scan_name.cpp @@ -18,14 +18,14 @@ SCAN_Name::SCAN_Name(const std::string& algo_spec) name[i] = global_state().deref_alias(name[i]); } -std::string SCAN_Name::argument(u32bit i) +std::string SCAN_Name::argument(u32bit i) const { if(i > arg_count()) throw std::range_error("SCAN_Name::argument"); return name[i+1]; } -u32bit SCAN_Name::argument_as_u32bit(u32bit i, u32bit def_value) +u32bit SCAN_Name::argument_as_u32bit(u32bit i, u32bit def_value) const { if(i >= arg_count()) return def_value; diff --git a/src/utils/scan_name.h b/src/utils/scan_name.h index 37c9ffc1b..934228dc8 100644 --- a/src/utils/scan_name.h +++ b/src/utils/scan_name.h @@ -38,13 +38,13 @@ class SCAN_Name @param i which argument @return the ith argument */ - std::string argument(u32bit i); + std::string argument(u32bit i) const; /** @param i which argument @return the ith argument as a u32bit, or a default value */ - u32bit argument_as_u32bit(u32bit i, u32bit def_value); + u32bit argument_as_u32bit(u32bit i, u32bit def_value) const; private: std::vector<std::string> name; |