From 31a1b12011e6d14f15b643b5ffde67d9df526e8d Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 9 Nov 2008 22:58:31 +0000 Subject: Constify --- src/utils/scan_name.cpp | 4 ++-- 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 name; -- cgit v1.2.3