X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ab92608267358b56adf7a803480fa2ad9608ed1b..f9436b840852218b39dce22d6057b6f223168daa:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index dd505c0d7a..cbb08ad13e 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -137,7 +137,7 @@ std::ifstream* surf_ifsopen(const char* name) std::string buff = path_elm + FILE_DELIM + name; fs->open(buff.c_str(), std::ifstream::in); - if (!fs->fail()) { + if (not fs->fail()) { XBT_DEBUG("Found file at %s", buff.c_str()); return fs; } @@ -192,7 +192,7 @@ const char *__surf_get_initial_path() unsigned int len = GetCurrentDirectory(MAX_PATH + 1, current_directory); char root[4] = { 0 }; - if (!len) + if (not len) return nullptr; strncpy(root, current_directory, 3); @@ -243,10 +243,10 @@ int find_model_description(s_surf_model_description_t * table, char *name_list = nullptr; for (i = 0; table[i].name; i++) - if (!strcmp(name, table[i].name)) { + if (not strcmp(name, table[i].name)) { return i; } - if (!table[0].name) + if (not table[0].name) xbt_die("No model is valid! This is a bug."); name_list = xbt_strdup(table[0].name); for (i = 1; table[i].name; i++) { @@ -354,9 +354,9 @@ void surf_init(int *argc, char **argv) SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free); xbt_init(argc, argv); - if (!all_existing_models) + if (not all_existing_models) all_existing_models = new std::vector(); - if (!future_evt_set) + if (not future_evt_set) future_evt_set = new simgrid::trace_mgr::future_evt_set(); TRACE_surf_alloc(); @@ -453,7 +453,7 @@ double Model::nextOccuringEventLazy(double now) lmm_solve(maxminSystem_); XBT_DEBUG("After share resources, The size of modified actions set is %zd", modifiedSet_->size()); - while(!modifiedSet_->empty()) { + while (not modifiedSet_->empty()) { Action *action = &(modifiedSet_->front()); modifiedSet_->pop_front(); bool max_dur_flag = false; @@ -766,7 +766,7 @@ void Action::cancel(){ int Action::unref(){ refcount_--; - if (!refcount_) { + if (not refcount_) { if (action_hook.is_linked()) stateSet_->erase(stateSet_->iterator_to(*this)); if (getVariable())