Esempio n. 1
0
optional<Value> EntityMap<Key, Value>::getMaybe(typename UniqueEntity<Key>::Id id) const {
  try {
    return getOrFail(id);
  } catch (std::out_of_range) {
    return none;
  }
}
Esempio n. 2
0
void VisibilityMap::removePositions(const vector<Position>& positions) {
  for (Position v : positions)
    if (--visibilityCount.getOrFail(v) == 0)
      v.setNeedsRenderUpdate(true);
}
Esempio n. 3
0
Value& EntityMap<Key, Value>::getOrFail(const Key* key) {
  return getOrFail(key->getUniqueId());
}
Esempio n. 4
0
Value& EntityMap<Key, Value>::getOrFail(WeakPointer<const Key> key) {
  return getOrFail(key->getUniqueId());
}