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
attempt to get rid of all const_cast
[simgrid.git]
/
include
/
xbt
/
functional.hpp
diff --git
a/include/xbt/functional.hpp
b/include/xbt/functional.hpp
index
7596ef6
..
2c7c87d
100644
(file)
--- a/
include/xbt/functional.hpp
+++ b/
include/xbt/functional.hpp
@@
-43,7
+43,7
@@
public:
std::vector<std::string> args = *args_;
std::unique_ptr<char*[]> argv(new char*[argc + 1]);
for (int i = 0; i != argc; ++i)
std::vector<std::string> args = *args_;
std::unique_ptr<char*[]> argv(new char*[argc + 1]);
for (int i = 0; i != argc; ++i)
- argv[i] = args[i].empty() ?
const_cast<char*>("")
: &args[i].front();
+ argv[i] = args[i].empty() ?
'\0'
: &args[i].front();
argv[argc] = nullptr;
code_(argc, argv.get());
}
argv[argc] = nullptr;
code_(argc, argv.get());
}