From 749e3155b52b8ab6701674590b8b6d4be759e41a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 1 Apr 2021 01:43:18 -0500 Subject: [PATCH] [ox/clargs] Make arg reading methods const --- deps/ox/src/ox/clargs/clargs.cpp | 6 +++--- deps/ox/src/ox/clargs/clargs.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deps/ox/src/ox/clargs/clargs.cpp b/deps/ox/src/ox/clargs/clargs.cpp index be748018..0f34d945 100644 --- a/deps/ox/src/ox/clargs/clargs.cpp +++ b/deps/ox/src/ox/clargs/clargs.cpp @@ -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]; } -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; } -int ClArgs::getInt(const char *arg) { +int ClArgs::getInt(const char *arg) const { return m_ints[arg]; } diff --git a/deps/ox/src/ox/clargs/clargs.hpp b/deps/ox/src/ox/clargs/clargs.hpp index 3346e038..5fbeb7cf 100644 --- a/deps/ox/src/ox/clargs/clargs.hpp +++ b/deps/ox/src/ox/clargs/clargs.hpp @@ -23,11 +23,11 @@ class ClArgs { public: 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; }; }