From 5898ab024165448b65e73ddbf7a6c9143e8b8e68 Mon Sep 17 00:00:00 2001 From: RecursiveVision <66801010+RecursiveVision@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:52:31 -0400 Subject: [PATCH] Slight optimization --- CvGameCoreDLL_Expansion2/CvGame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CvGameCoreDLL_Expansion2/CvGame.cpp b/CvGameCoreDLL_Expansion2/CvGame.cpp index 242e6deb3e..bd9b7b8f0e 100644 --- a/CvGameCoreDLL_Expansion2/CvGame.cpp +++ b/CvGameCoreDLL_Expansion2/CvGame.cpp @@ -13813,13 +13813,13 @@ void CvGame::SpawnArchaeologySitesHistorically() } } - // sort the weight vector - aDigSiteWeights.StableSortItems(); - // Nowhere left to place a dig site! if (aDigSiteWeights.empty()) return; + // sort the weight vector + aDigSiteWeights.StableSortItems(); + // add the best dig site int iBestSite = aDigSiteWeights.GetElement(0); CvPlot* pPlot = theMap.plotByIndexUnchecked(iBestSite);