Browse Source

ETeleportChannelType: is now strongly typed enumeration

ArseniyShestakov 10 years ago
parent
commit
eff4da1d03
3 changed files with 8 additions and 11 deletions
  1. 1 1
      lib/CGameInfoCallback.cpp
  2. 1 1
      lib/CGameInfoCallback.h
  3. 6 9
      lib/GameConstants.h

+ 1 - 1
lib/CGameInfoCallback.cpp

@@ -716,7 +716,7 @@ std::vector<ObjectInstanceID> CGameInfoCallback::getTeleportChannelExits(Telepor
 	return ret;
 	return ret;
 }
 }
 
 
-ETeleportChannelType::ETeleportChannelType CGameInfoCallback::getTeleportChannelType(TeleportChannelID id, PlayerColor Player) const
+ETeleportChannelType CGameInfoCallback::getTeleportChannelType(TeleportChannelID id, PlayerColor Player) const
 {
 {
 	std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, ObjectInstanceID(), Player);
 	std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, ObjectInstanceID(), Player);
 	std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, ObjectInstanceID(), Player);
 	std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, ObjectInstanceID(), Player);

+ 1 - 1
lib/CGameInfoCallback.h

@@ -111,7 +111,7 @@ public:
 	//teleport
 	//teleport
 	std::vector<ObjectInstanceID> getTeleportChannelEntraces(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
 	std::vector<ObjectInstanceID> getTeleportChannelEntraces(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
 	std::vector<ObjectInstanceID> getTeleportChannelExits(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
 	std::vector<ObjectInstanceID> getTeleportChannelExits(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
-	ETeleportChannelType::ETeleportChannelType getTeleportChannelType(TeleportChannelID id, PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
+	ETeleportChannelType getTeleportChannelType(TeleportChannelID id, PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
 	bool isTeleportEntrancePassable(const CGTeleport * obj, PlayerColor Player) const;
 	bool isTeleportEntrancePassable(const CGTeleport * obj, PlayerColor Player) const;
 };
 };
 
 

+ 6 - 9
lib/GameConstants.h

@@ -474,16 +474,13 @@ namespace ETileType
 	};
 	};
 }
 }
 
 
-namespace ETeleportChannelType
+enum class ETeleportChannelType
 {
 {
-	enum ETeleportChannelType
-	{
-		IMPASSABLE,
-		BIDIRECTIONAL,
-		UNIDIRECTIONAL,
-		MIXED
-	};
-}
+	IMPASSABLE,
+	BIDIRECTIONAL,
+	UNIDIRECTIONAL,
+	MIXED
+};
 
 
 class Obj
 class Obj
 {
 {