mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 20:22:31 +01:00
- trying to bugfix crashes with grouped commands
This commit is contained in:
parent
72c12a3459
commit
42bbbd2e42
@ -30,7 +30,7 @@ using Shared::Util::RandomGen;
|
||||
|
||||
namespace Glest { namespace Game {
|
||||
|
||||
bool CommandGroupUnitSorter::compare(const Unit *l, const Unit *r) {
|
||||
bool CommandGroupUnitSorter::operator()(const Unit *l, const Unit *r) {
|
||||
if(!l) {
|
||||
printf("Error l == NULL\n");
|
||||
}
|
||||
@ -127,7 +127,7 @@ bool CommandGroupUnitSorter::compare(const Unit *l, const Unit *r) {
|
||||
}
|
||||
|
||||
void Faction::sortUnitsByCommandGroups() {
|
||||
std::sort(units.begin(),units.end(),CommandGroupUnitSorter::compare);
|
||||
std::sort(units.begin(),units.end(),CommandGroupUnitSorter());
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
|
@ -49,9 +49,8 @@ class Faction;
|
||||
/// Each of the game players
|
||||
// =====================================================
|
||||
|
||||
class CommandGroupUnitSorter {
|
||||
public:
|
||||
static bool compare(const Unit *l, const Unit *r);
|
||||
struct CommandGroupUnitSorter {
|
||||
bool operator()(const Unit *l, const Unit *r);
|
||||
};
|
||||
|
||||
class FactionThread : public BaseThread {
|
||||
|
Loading…
x
Reference in New Issue
Block a user