mirror of
https://github.com/oatpp/oatpp.git
synced 2025-03-31 18:30:22 +08:00
make methods of CommandLineArguments const
This commit is contained in:
parent
6131dcc5f5
commit
5e59def128
6
.gitignore
vendored
6
.gitignore
vendored
@ -31,6 +31,10 @@
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# Mac
|
||||
|
||||
**/.DS_Store
|
||||
|
||||
#idea
|
||||
.idea/
|
||||
cmake-build-debug/
|
||||
@ -38,4 +42,4 @@ cmake-build-debug/
|
||||
#local build
|
||||
build/
|
||||
srt/build/
|
||||
test/build/
|
||||
test/build/
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
* @param argName - name of the target argument.
|
||||
* @return - `true` if present.
|
||||
*/
|
||||
bool hasArgument(const char* argName) {
|
||||
bool hasArgument(const char* argName) const {
|
||||
return Parser::hasArgument(m_argc, m_argv, argName);
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
* @param argName - name of the target argument.
|
||||
* @return - index of the argument in argv[] array. -1 if there is no such argument.
|
||||
*/
|
||||
v_int32 getArgumentIndex(const char* argName) {
|
||||
v_int32 getArgumentIndex(const char* argName) const {
|
||||
return Parser::getArgumentIndex(m_argc, m_argv, argName);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ public:
|
||||
* @param defaultValue - default value to return in case not found.
|
||||
* @return - argument which starts with the specified prefix. defaultValue if not found.
|
||||
*/
|
||||
const char* getArgumentStartingWith(const char* argNamePrefix, const char* defaultValue = nullptr) {
|
||||
const char* getArgumentStartingWith(const char* argNamePrefix, const char* defaultValue = nullptr) const {
|
||||
return Parser::getArgumentStartingWith(m_argc, m_argv, argNamePrefix, defaultValue);
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ public:
|
||||
* @param defaultValue - default value to return in case not found.
|
||||
* @return - value preceded by the argument. defaultValue if not found.
|
||||
*/
|
||||
const char* getNamedArgumentValue(const char* argName, const char* defaultValue = nullptr) {
|
||||
const char* getNamedArgumentValue(const char* argName, const char* defaultValue = nullptr) const {
|
||||
return Parser::getNamedArgumentValue(m_argc, m_argv, argName, defaultValue);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user