Browse Source

Added assertion

Former-commit-id: beeff9bff9
tempestpy_adaptions
Mavo 9 years ago
parent
commit
e443384b91
  1. 4
      src/modelchecker/results/ExplicitQuantitativeCheckResult.cpp

4
src/modelchecker/results/ExplicitQuantitativeCheckResult.cpp

@ -5,6 +5,7 @@
#include "src/utility/macros.h"
#include "src/utility/vector.h"
#include "src/exceptions/InvalidOperationException.h"
#include "src/exceptions/InvalidAccessException.h"
#include "src/adapters/CarlAdapter.h"
@ -60,6 +61,7 @@ namespace storm {
if (this->isResultForAllStates()) {
map_type newMap;
for (auto const& element : filterTruthValues) {
STORM_LOG_THROW(element < this->getValueVector().size(), storm::exceptions::InvalidAccessException, "Invalid index in results.");
newMap.emplace(element, this->getValueVector()[element]);
}
this->values = newMap;
@ -253,4 +255,4 @@ namespace storm {
template class ExplicitQuantitativeCheckResult<storm::RationalFunction>;
#endif
}
}
}
Loading…
Cancel
Save