Skip to content

Commit

Permalink
Slight optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Sep 23, 2023
1 parent 3124a64 commit 5898ab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CvGameCoreDLL_Expansion2/CvGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5898ab0

Please sign in to comment.