void Warning(const char* message, bool one_time, u64 category) { auto hash = Hash::MurmurHash2_64(message, strlen(message), 0); bool print = !one_time; if (one_time) { WarningsRWL.LockShared(); if (!Contains(WarningsIssued, hash)) { print = true; WarningsRWL.UnlockShared(); WarningsRWL.LockExclusive(); WarningsIssued[hash] = category; WarningsRWL.UnlockExclusive(); } else { WarningsRWL.UnlockShared(); } } if (print) { ConsolePrint("WARNING: "); ConsolePrint(message); } }