Browse Source

Fixed initialization order warnings

tempestpy_adaptions
Matthias Volk 5 years ago
parent
commit
c1b4c3270f
  1. 4
      src/storm/simulator/DiscreteTimeSparseModelSimulator.cpp
  2. 4
      src/storm/utility/random.cpp

4
src/storm/simulator/DiscreteTimeSparseModelSimulator.cpp

@ -4,7 +4,7 @@
namespace storm { namespace storm {
namespace simulator { namespace simulator {
template<typename ValueType, typename RewardModelType> template<typename ValueType, typename RewardModelType>
DiscreteTimeSparseModelSimulator<ValueType,RewardModelType>::DiscreteTimeSparseModelSimulator(storm::models::sparse::Model<ValueType, RewardModelType> const& model) : model(model), currentState(*model.getInitialStates().begin()) {
DiscreteTimeSparseModelSimulator<ValueType,RewardModelType>::DiscreteTimeSparseModelSimulator(storm::models::sparse::Model<ValueType, RewardModelType> const& model) : currentState(*model.getInitialStates().begin()), model(model) {
STORM_LOG_WARN_COND(model.getInitialStates().getNumberOfSetBits()==1, "The model has multiple initial states. This simulator assumes it starts from the initial state with the lowest index."); STORM_LOG_WARN_COND(model.getInitialStates().getNumberOfSetBits()==1, "The model has multiple initial states. This simulator assumes it starts from the initial state with the lowest index.");
} }
@ -47,4 +47,4 @@ namespace storm {
template class DiscreteTimeSparseModelSimulator<double>; template class DiscreteTimeSparseModelSimulator<double>;
} }
}
}

4
src/storm/utility/random.cpp

@ -10,7 +10,7 @@ namespace storm {
} }
RandomProbabilityGenerator<double>::RandomProbabilityGenerator(uint64_t seed) RandomProbabilityGenerator<double>::RandomProbabilityGenerator(uint64_t seed)
: engine(seed), distribution(0.0, 1.0)
: distribution(0.0, 1.0), engine(seed)
{ {
} }
@ -21,4 +21,4 @@ namespace storm {
} }
}
}
Loading…
Cancel
Save