124 files changed.

This commit is contained in:
Milxnor
2023-04-15 19:53:58 -04:00
parent 63473de425
commit bbf28ed9e9
124 changed files with 60988 additions and 577 deletions

View File

@@ -124,21 +124,27 @@ public:
}
return false;
}
FORCEINLINE ValueType& GetByKey(const KeyType& Key)
FORCEINLINE ValueType& GetByKey(const KeyType& Key, bool* wasSuccessful = nullptr)
{
for (auto& Pair : *this)
{
if (Pair.Key() == Key)
{
if (wasSuccessful)
*wasSuccessful = true;
return Pair.Value();
}
}
LOG_INFO(LogDev, "Failed to find Key!!!");
// LOG_INFO(LogDev, "Failed to find Key!!!");
if (wasSuccessful)
*wasSuccessful = false;
}
FORCEINLINE ValueType& Find(const KeyType& Key)
FORCEINLINE ValueType& Find(const KeyType& Key, bool* wasSuccessful = nullptr)
{
return GetByKey(Key);
return GetByKey(Key, wasSuccessful);
}
FORCEINLINE ValueType GetByKeyNoRef(const KeyType& Key)
{