瀏覽代碼

Fixed cache creation

Seems to sometimes be needed on MSVS at least
Lemongrass3110 3 年之前
父節點
當前提交
bdb2ae3446
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/common/database.hpp

+ 3 - 0
src/common/database.hpp

@@ -171,6 +171,9 @@ public:
 	}
 
 	void loadingFinished() override{
+		this->cache.clear();
+		this->cache.resize( this->size(), nullptr );
+
 		// Cache all known values
 		for (auto &pair : *this) {
 			// Calculate the key that should be used