From: Arnaud Giersch Date: Fri, 18 Mar 2022 13:26:23 +0000 (+0100) Subject: Cosmetics: coding-style. X-Git-Tag: v3.31~10 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c2d1071bb7588190188d8cc5962374fd39b42931 Cosmetics: coding-style. [ci-skip] --- diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index f06eb011f9..bb3d098cfa 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -345,7 +345,7 @@ void EngineImpl::seal_platform() const void EngineImpl::load_platform(const std::string& platf) { double start = xbt_os_time(); - if (boost::algorithm::ends_with(platf, ".so") or boost::algorithm::ends_with(platf, ".dylib")) { + if (boost::algorithm::ends_with(platf, ".so") || boost::algorithm::ends_with(platf, ".dylib")) { #ifdef _WIN32 xbt_die("loading platform through shared library isn't supported on windows"); #else diff --git a/src/kernel/resource/profile/ProfileBuilder.cpp b/src/kernel/resource/profile/ProfileBuilder.cpp index 3db37261ff..ba7a2259f4 100644 --- a/src/kernel/resource/profile/ProfileBuilder.cpp +++ b/src/kernel/resource/profile/ProfileBuilder.cpp @@ -144,7 +144,7 @@ public: } xbt_assert(splittedval.size() > i, "Invalid profile line"); - if (i == 1 or i == 2) { + if (i == 1 || i == 2) { stochevent.date_params = {std::stod(splittedval[i - 1])}; } else if (i == 3) { stochevent.date_params = {std::stod(splittedval[1]), std::stod(splittedval[2])}; @@ -169,7 +169,7 @@ public: } xbt_assert(splittedval.size() > i + j, "Invalid profile line"); - if (j == 0 or j == 1) { + if (j == 0 || j == 1) { stochevent.value_params = {std::stod(splittedval[i + j])}; } else if (j == 2) { stochevent.value_params = {std::stod(splittedval[i + 1]), std::stod(splittedval[i + 2])}; @@ -188,9 +188,9 @@ public: pattern.emplace_back(stochevent); } - xbt_assert(not stochastic or periodicity <= 0, "If you want periodicity with stochastic profiles, use LOOP_AFTER"); + xbt_assert(not stochastic || periodicity <= 0, "If you want periodicity with stochastic profiles, use LOOP_AFTER"); if (periodicity > 0) { - xbt_assert(loop and loop_delay == 0); + xbt_assert(loop && loop_delay == 0); loop_delay = periodicity - last_date; } @@ -199,7 +199,7 @@ public: double get_repeat_delay() const { - if (not stochastic and loop) + if (not stochastic && loop) return loop_delay; return -1.0; } @@ -207,7 +207,7 @@ public: void operator()(std::vector& event_list) const { size_t initial_size = event_list.size(); - if (loop or not initial_size) { + if (loop || not initial_size) { for (auto const& dv : pattern) event_list.emplace_back(dv.get_datedvalue()); if (initial_size)