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