diff --git a/src/interpreter.cpp b/src/interpreter.cpp index 9ba933707b..03e9d701dd 100644 --- a/src/interpreter.cpp +++ b/src/interpreter.cpp @@ -29,15 +29,11 @@ void Interpreter::InterpreterImpl::setModel(const AnalyserModelPtr &model) mVoi = 0.0; if (mModel != nullptr) { - mStates.resize(mModel->stateCount()); - mRates.resize(mModel->stateCount()); - mVariables.resize(mModel->variableCount()); - static const auto NaN = std::numeric_limits::quiet_NaN(); - std::fill(mStates.begin(), mStates.end(), NaN); - std::fill(mRates.begin(), mRates.end(), NaN); - std::fill(mVariables.begin(), mVariables.end(), NaN); + mStates = std::vector(mModel->stateCount(), NaN); + mRates = std::vector(mModel->stateCount(), NaN); + mVariables = std::vector(mModel->variableCount(), NaN); } else { mStates.clear(); mRates.clear();