aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-09 22:58:31 +0000
committerlloyd <[email protected]>2008-11-09 22:58:31 +0000
commit31a1b12011e6d14f15b643b5ffde67d9df526e8d (patch)
treed0faff92dd1d7c1c92952744bdfa541d9dbb263e
parent986f88320c05cc8ab064451858af3c1f949e89fa (diff)
Constify
-rw-r--r--src/utils/scan_name.cpp4
-rw-r--r--src/utils/scan_name.h4
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;