Sfoglia il codice sorgente

Minor optimization.

DjWarmonger 10 anni fa
parent
commit
fe2a72f543
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. 2 3
      AI/VCAI/Fuzzy.cpp

+ 2 - 3
AI/VCAI/Fuzzy.cpp

@@ -539,8 +539,7 @@ SectorMap& FuzzyHelper::getCachedSectorMap(HeroPtr h)
 		return it->second;
 	else
 	{
-		cachedSectorMaps[h] = SectorMap(h);
+		cachedSectorMaps.insert (std::make_pair(h, SectorMap(h)));
+		return cachedSectorMaps[h];
 	}
-
-	return cachedSectorMaps[h];
 }