[ox/clargs] Make arg reading methods const

This commit is contained in:
Gary Talent 2021-04-01 01:43:18 -05:00
parent b486a4962e
commit 749e3155b5
2 changed files with 6 additions and 6 deletions

View File

@ -38,15 +38,15 @@ ClArgs::ClArgs(int argc, const char **args) {
} }
} }
bool ClArgs::getBool(const char *arg) { bool ClArgs::getBool(const char *arg) const {
return m_bools[arg]; return m_bools[arg];
} }
String ClArgs::getString(const char *argName, const char *defaultArg) { String ClArgs::getString(const char *argName, const char *defaultArg) const {
return m_strings.contains(argName) ? m_strings[argName].c_str() : defaultArg; return m_strings.contains(argName) ? m_strings[argName].c_str() : defaultArg;
} }
int ClArgs::getInt(const char *arg) { int ClArgs::getInt(const char *arg) const {
return m_ints[arg]; return m_ints[arg];
} }

View File

@ -23,11 +23,11 @@ class ClArgs {
public: public:
ClArgs(int argc, const char **args); ClArgs(int argc, const char **args);
bool getBool(const char *arg); bool getBool(const char *arg) const;
String getString(const char *argName, const char *defaultArg = ""); String getString(const char *argName, const char *defaultArg = "") const;
int getInt(const char *arg); int getInt(const char *arg) const;
}; };
} }