A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Misc code simplifications guided by Sonar smells.
[simgrid.git]
/
src
/
xbt
/
config.cpp
diff --git
a/src/xbt/config.cpp
b/src/xbt/config.cpp
index
0ae2bf8
..
08b403b
100644
(file)
--- a/
src/xbt/config.cpp
+++ b/
src/xbt/config.cpp
@@
-386,8
+386,7
@@
void set_parse(const std::string& opt)
std::string val = name.substr(pos + 1);
name.erase(pos);
std::string val = name.substr(pos + 1);
name.erase(pos);
- const std::string path("path");
- if (name.compare(0, path.length(), path) != 0)
+ if (name.rfind("path", 0) != 0)
XBT_INFO("Configuration change: Set '%s' to '%s'", name.c_str(), val.c_str());
set_as_string(name.c_str(), val);
XBT_INFO("Configuration change: Set '%s' to '%s'", name.c_str(), val.c_str());
set_as_string(name.c_str(), val);