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
Remove nested code blocks (Sonar).
[simgrid.git]
/
src
/
mc
/
explo
/
odpor
/
ReversibleRaceCalculator.cpp
diff --git
a/src/mc/explo/odpor/ReversibleRaceCalculator.cpp
b/src/mc/explo/odpor/ReversibleRaceCalculator.cpp
index efab9d39529e417fba8393dd1c93b7d71baa2bd7..f2db6b6b9a22642c3bdcfb3d6b61e85fe5a229e4 100644
(file)
--- a/
src/mc/explo/odpor/ReversibleRaceCalculator.cpp
+++ b/
src/mc/explo/odpor/ReversibleRaceCalculator.cpp
@@
-41,7
+41,7
@@
bool ReversibleRaceCalculator::is_race_reversible(const Execution& E, Execution:
{Action::TESTANY, &ReversibleRaceCalculator::is_race_reversible_TestAny},
{Action::WAITANY, &ReversibleRaceCalculator::is_race_reversible_WaitAny}};
- const auto e2_action = E.get_transition_for_handle(e2);
+ const auto
*
e2_action = E.get_transition_for_handle(e2);
if (const auto handler = handlers.find(e2_action->type_); handler != handlers.end()) {
return handler->second(E, e1, e2_action);
} else {
@@
-100,7
+100,7
@@
bool ReversibleRaceCalculator::is_race_reversible_CommWait(const Execution& E, E
// If the other event is a communication event, then we
// are not reversible; otherwise we are reversible.
const auto e1_action = E.get_transition_for_handle(e1)->type_;
- return e1_action != Transition::Type::COMM_ASYNC_SEND
and
e1_action != Transition::Type::COMM_ASYNC_RECV;
+ return e1_action != Transition::Type::COMM_ASYNC_SEND
&&
e1_action != Transition::Type::COMM_ASYNC_RECV;
}
bool ReversibleRaceCalculator::is_race_reversible_CommTest(const Execution&, Execution::EventHandle e1,
@@
-143,7
+143,7
@@
bool ReversibleRaceCalculator::is_race_reversible_MutexWait(const Execution& E,
{
// TODO: Get the semantics correct here
const auto e1_action = E.get_transition_for_handle(e1)->type_;
- return e1_action != Transition::Type::MUTEX_ASYNC_LOCK
and
e1_action != Transition::Type::MUTEX_UNLOCK;
+ return e1_action != Transition::Type::MUTEX_ASYNC_LOCK
&&
e1_action != Transition::Type::MUTEX_UNLOCK;
}
bool ReversibleRaceCalculator::is_race_reversible_SemAsyncLock(const Execution&, Execution::EventHandle e1,
@@
-196,4
+196,4
@@
bool ReversibleRaceCalculator::is_race_reversible_WaitAny(const Execution&, Exec
return false;
}
-} // namespace simgrid::mc::odpor
\ No newline at end of file
+} // namespace simgrid::mc::odpor