| 214 | /// Helper function for KnownState::reduceToCommonKnowledge, removes everything from |
| 215 | /// _this which is not in or not equal to the value in _other. |
| 216 | template <class Mapping> void intersect(Mapping& _this, Mapping const& _other) |
| 217 | { |
| 218 | for (auto it = _this.begin(); it != _this.end();) |
| 219 | if (_other.count(it->first) && _other.at(it->first) == it->second) |
| 220 | ++it; |
| 221 | else |
| 222 | it = _this.erase(it); |
| 223 | } |
| 224 | |
| 225 | void KnownState::reduceToCommonKnowledge(KnownState const& _other, bool _combineSequenceNumbers) |
| 226 | { |