From 06b3df9c30549c3e0b9f61ba2f0c23eef0eee4e0 Mon Sep 17 00:00:00 2001 From: v4hn Date: Wed, 1 Sep 2021 14:53:52 +0200 Subject: [PATCH] split assert so that it becomes obvious which condition triggered it. --- core/src/storage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/storage.cpp b/core/src/storage.cpp index dcb01a50..9fc755d0 100644 --- a/core/src/storage.cpp +++ b/core/src/storage.cpp @@ -106,8 +106,10 @@ void Interface::add(InterfaceState& state) { it->priority_ = InterfaceState::Priority(1, state.incomingTrajectories().front()->cost()); else if (!state.outgoingTrajectories().empty()) it->priority_ = InterfaceState::Priority(1, state.outgoingTrajectories().front()->cost()); - else // otherwise, assume priority was well defined before - assert(it->priority_.enabled() && it->priority_.depth() >= 1u); + else { // otherwise, assume priority was well defined before + assert(it->priority_.enabled()); + assert(it->priority_.depth() >= 1u); + } // move list node into interface's state list (sorted by priority) moveFrom(it, container);