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
[codacy/cppcheck] Reduce scope for variables.
[simgrid.git]
/
src
/
s4u
/
s4u_Engine.cpp
diff --git
a/src/s4u/s4u_Engine.cpp
b/src/s4u/s4u_Engine.cpp
index
2bcc793
..
0576607
100644
(file)
--- a/
src/s4u/s4u_Engine.cpp
+++ b/
src/s4u/s4u_Engine.cpp
@@
-86,20
+86,15
@@
double Engine::get_clock()
*/
void Engine::load_platform(std::string platf)
{
*/
void Engine::load_platform(std::string platf)
{
- double start = 0;
- double end = 0;
- if (XBT_LOG_ISENABLED(s4u_engine, xbt_log_priority_debug))
- start = xbt_os_time();
+ double start = xbt_os_time();
try {
parse_platform_file(platf);
} catch (xbt_ex& e) {
xbt_die("Error while loading %s: %s", platf.c_str(), e.what());
}
try {
parse_platform_file(platf);
} catch (xbt_ex& e) {
xbt_die("Error while loading %s: %s", platf.c_str(), e.what());
}
- if (XBT_LOG_ISENABLED(s4u_engine, xbt_log_priority_debug)) {
- end = xbt_os_time();
- XBT_DEBUG("PARSE TIME: %g", (end - start));
- }
+ double end = xbt_os_time();
+ XBT_DEBUG("PARSE TIME: %g", (end - start));
}
void Engine::register_function(std::string name, int (*code)(int, char**))
}
void Engine::register_function(std::string name, int (*code)(int, char**))