Browse Source

Use pass-by-value in constructor

Pass by rvalue reference results in
build errors when using CLN
tempestpy_adaptions
Daniel Basgöze 3 years ago
committed by Stefan Pranger
parent
commit
12111a91bd
  1. 4
      src/storm-pomdp/storage/BeliefManager.cpp
  2. 4
      src/storm-pomdp/storage/BeliefManager.h

4
src/storm-pomdp/storage/BeliefManager.cpp

@ -14,7 +14,7 @@ namespace storm {
} }
template<typename PomdpType, typename BeliefValueType, typename StateType> template<typename PomdpType, typename BeliefValueType, typename StateType>
BeliefManager<PomdpType, BeliefValueType, StateType>::FreudenthalDiff::FreudenthalDiff(StateType const &dimension, BeliefValueType &&diff) : dimension(dimension),
BeliefManager<PomdpType, BeliefValueType, StateType>::FreudenthalDiff::FreudenthalDiff(StateType const &dimension, BeliefValueType diff) : dimension(dimension),
diff(std::move(diff)) { diff(std::move(diff)) {
// Intentionally left empty // Intentionally left empty
} }
@ -514,4 +514,4 @@ namespace storm {
template class BeliefManager<storm::models::sparse::Pomdp<storm::RationalNumber>>; template class BeliefManager<storm::models::sparse::Pomdp<storm::RationalNumber>>;
} }
}
}

4
src/storm-pomdp/storage/BeliefManager.h

@ -76,7 +76,7 @@ namespace storm {
}; };
struct FreudenthalDiff { struct FreudenthalDiff {
FreudenthalDiff(StateType const &dimension, BeliefValueType &&diff);
FreudenthalDiff(StateType const &dimension, BeliefValueType diff);
StateType dimension; // i StateType dimension; // i
BeliefValueType diff; // d[i] BeliefValueType diff; // d[i]
@ -123,4 +123,4 @@ namespace storm {
}; };
} }
}
}
Loading…
Cancel
Save