aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2017-03-29 17:51:41 +0200
committerJorge Timón <jtimon@jtimon.cc>2017-06-27 02:54:19 +0200
commit506b700dcb5dd5a7c1d8ffa7c77043a93e4e10de (patch)
tree7f46aa37dccf2c77cb897c00afbede86e40a7f42 /src/util.cpp
parent234ffc677ee58591b139695bf92bbd6f504ee91a (diff)
Util: Remove redundant calls to gArgs.IsArgSet()
Return empty std::vector<std::string> with ArgsManager::GetArgs if nothing is set for that string
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 20a8082017..27ccd40b7b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -420,7 +420,9 @@ void ArgsManager::ParseParameters(int argc, const char* const argv[])
std::vector<std::string> ArgsManager::GetArgs(const std::string& strArg)
{
LOCK(cs_args);
- return mapMultiArgs.at(strArg);
+ if (IsArgSet(strArg))
+ return mapMultiArgs.at(strArg);
+ return {};
}
bool ArgsManager::IsArgSet(const std::string& strArg)