Skip to content

Commit 06b3df9

Browse files
committed
split assert
so that it becomes obvious which condition triggered it.
1 parent fa8d217 commit 06b3df9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/storage.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ void Interface::add(InterfaceState& state) {
106106
it->priority_ = InterfaceState::Priority(1, state.incomingTrajectories().front()->cost());
107107
else if (!state.outgoingTrajectories().empty())
108108
it->priority_ = InterfaceState::Priority(1, state.outgoingTrajectories().front()->cost());
109-
else // otherwise, assume priority was well defined before
110-
assert(it->priority_.enabled() && it->priority_.depth() >= 1u);
109+
else { // otherwise, assume priority was well defined before
110+
assert(it->priority_.enabled());
111+
assert(it->priority_.depth() >= 1u);
112+
}
111113

112114
// move list node into interface's state list (sorted by priority)
113115
moveFrom(it, container);

0 commit comments

Comments
 (0)