aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-08-08 17:02:13 +0100
committerCharlie Blake2018-08-08 17:02:13 +0100
commit5613822035a28bd95dbe9b0ef3f2076c45f86df6 (patch)
tree3f4e6afa7accc91ae8c2a0fa01a84b56e7cb5c3c /src/main/game/global_cache.cpp
parentChange output of results to uint64_t data types (diff)
downloadmetasol-5613822035a28bd95dbe9b0ef3f2076c45f86df6.tar.gz
metasol-5613822035a28bd95dbe9b0ef3f2076c45f86df6.zip

Only log cache full error when in debug mode

Diffstat (limited to 'src/main/game/global_cache.cpp')
-rw-r--r--src/main/game/global_cache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp
index 90d962d..f1cf185 100644
--- a/src/main/game/global_cache.cpp
+++ b/src/main/game/global_cache.cpp
@@ -217,7 +217,9 @@ pair<item_list::iterator, bool> lru_cache::insert(const game_state& gs) {
cache.relocate(cache.begin(), prev(cache.end()));
if (i == max_num_items) {
+#ifndef NDEBUG
LOG_ERROR("All items in cache are live and cache is full");
+#endif
throw runtime_error("All items in cache are live and cache is full");
}
}