// Copyright Epic Games, Inc. All Rights Reserved. #include ////////////////////////////////////////////////////////////////////////// namespace zen { void HashKeySet::AddHashToSet(const IoHash& HashToAdd) { m_HashSet.insert(HashToAdd); } void HashKeySet::AddHashesToSet(std::span HashesToAdd) { m_HashSet.insert(HashesToAdd.begin(), HashesToAdd.end()); } void HashKeySet::RemoveHashesIf(std::function&& Predicate) { for (auto It = begin(m_HashSet), ItEnd = end(m_HashSet); It != ItEnd;) { if (Predicate(*It)) { It = m_HashSet.erase(It); } else { ++It; } } } void HashKeySet::IterateHashes(std::function&& Callback) const { for (auto It = begin(m_HashSet), ItEnd = end(m_HashSet); It != ItEnd; ++It) { Callback(*It); } } ////////////////////////////////////////////////////////////////////////// // // Testing related code follows... // #if ZEN_WITH_TESTS void hashkeyset_forcelink() { } #endif } // namespace zen