瀏覽代碼

Minor optimization.

DjWarmonger 10 年之前
父節點
當前提交
fe2a72f543
共有 1 個文件被更改,包括 2 次插入3 次删除
  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];
 }