diff --git a/sc2/src/uqm/planets/pstarmap-modern.cpp b/sc2/src/uqm/planets/pstarmap-modern.cpp index 8aaf55093..1e8fff7e8 100644 --- a/sc2/src/uqm/planets/pstarmap-modern.cpp +++ b/sc2/src/uqm/planets/pstarmap-modern.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "../gamestr.h" #include "../starmap.h" @@ -50,12 +51,11 @@ compStarName (const int index1, const int index2) static void SortStarsOnName (STAR_SEARCH_STATE *pSS) { - std::cerr << "ADAM C++: Star sorting!" << std::endl; - int i; + //std::cerr << "ADAM C++: Star sorting!" << std::endl; + int *sorted = pSS->SortedStars; - for (i = 0; i < GetStarCount(); i++) - sorted[i] = i; + std::iota( sorted, sorted + GetStarCount(), 0 ); std::sort( sorted, sorted + GetStarCount(), compStarName ); }