Prechádzať zdrojové kódy

Fixed cache creation

Seems to sometimes be needed on MSVS at least
Lemongrass3110 3 rokov pred
rodič
commit
bdb2ae3446
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  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