Skip to content

Commit

Permalink
code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robn committed Oct 5, 2012
1 parent e3cacf3 commit 7b63c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/Factions.cpp
Expand Up @@ -12,6 +12,8 @@
#include "Polit.h"
#include "FileSystem.h"

const Uint32 Faction::BAD_FACTION_IDX = UINT_MAX;

typedef std::vector<Faction> FactionList;
typedef FactionList::iterator FactionIterator;
static FactionList s_factions;
Expand Down Expand Up @@ -292,7 +294,7 @@ const Uint32 Faction::GetNearestFactionIndex(const SystemPath& sysPath)
a = t;
}
// if the custom system has a valid govType set then try to find a matching faction
if( Polit::GOV_INVALID != a )
if( a != Polit::GOV_INVALID )
{
for (Uint32 index = 0; index < s_factions.size(); ++index) {
const Faction &fac = s_factions[index];
Expand Down
6 changes: 2 additions & 4 deletions src/Factions.h
Expand Up @@ -19,7 +19,9 @@ class Faction {
// XXX this is not as const-safe as it should be
static const Faction *GetFaction(const Uint32 index);
static const Uint32 GetNumFactions();

static const Uint32 GetNearestFactionIndex(const SystemPath& sysPath);
static const Uint32 BAD_FACTION_IDX; // returned by GetNearestFactionIndex if system has no faction

Faction();
~Faction();
Expand All @@ -44,10 +46,6 @@ class Faction {
EquipProbMap equip_legality;
//ship availability
Color colour;

enum {
BAD_FACTION_IDX = ((unsigned int)-1)
};
};

#endif /* _FACTIONS_H */

0 comments on commit 7b63c5e

Please sign in to comment.