diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 20:33:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 20:33:10 +0300 |
commit | 9f1994182d4225f630a93ae06b01927c4f7a9a37 (patch) | |
tree | b3557f6c6e6a923170929fd6553b59f872634291 /src/actormanager.cpp | |
parent | aef032f93b7bdc6e5908b2fa5f940a43bcfce50e (diff) | |
download | plus-9f1994182d4225f630a93ae06b01927c4f7a9a37.tar.gz plus-9f1994182d4225f630a93ae06b01927c4f7a9a37.tar.bz2 plus-9f1994182d4225f630a93ae06b01927c4f7a9a37.tar.xz plus-9f1994182d4225f630a93ae06b01927c4f7a9a37.zip |
Convert ActorType enum into strong typed enum.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r-- | src/actormanager.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 8c7d48752..121f5e3f3 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -93,7 +93,7 @@ class FindBeingFunctor final } uint16_t x, y; - ActorType::Type type; + ActorTypeT type; } beingActorFinder; class FindBeingEqualFunctor final @@ -239,7 +239,7 @@ void ActorManager::setPlayer(LocalPlayer *const player) } Being *ActorManager::createBeing(const BeingId id, - const ActorType::Type type, + const ActorTypeT type, const BeingTypeId subtype) { Being *const being = new Being(id, type, subtype, mMap); @@ -344,7 +344,7 @@ Being *ActorManager::findBeing(const BeingId id) const } Being *ActorManager::findBeing(const int x, const int y, - const ActorType::Type type) const + const ActorTypeT type) const { beingActorFinder.x = static_cast<uint16_t>(x); beingActorFinder.y = static_cast<uint16_t>(y); @@ -726,7 +726,7 @@ bool ActorManager::pickUpNearest(const int x, const int y, } Being *ActorManager::findBeingByName(const std::string &name, - const ActorType::Type type) const + const ActorTypeT type) const { for_actorsm { @@ -750,7 +750,7 @@ Being *ActorManager::findBeingByName(const std::string &name, } Being *ActorManager::findNearestByName(const std::string &name, - const ActorType::Type &type) const + const ActorTypeT &type) const { if (!localPlayer) return nullptr; @@ -826,7 +826,7 @@ void ActorManager::logic() if (!actor) continue; - const ActorType::Type &type = actor->getType(); + const ActorTypeT &type = actor->getType(); if (type == ActorType::Player) { const Being *const being = static_cast<const Being*>(actor); @@ -880,7 +880,7 @@ void ActorManager::clear() Being *ActorManager::findNearestLivingBeing(const int x, const int y, const int maxTileDist, - const ActorType::Type type, + const ActorTypeT type, const Being *const excluded) const { const int maxDist = maxTileDist * mapTileSize; @@ -894,7 +894,7 @@ Being *ActorManager::findNearestLivingBeing(const int x, const int y, Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, const int maxDist, - const ActorType::Type type, + const ActorTypeT type, const AllowSort allowSort) const { if (!aroundBeing) @@ -911,7 +911,7 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, int maxDist, - const ActorType::Type &type, + const ActorTypeT &type, const int x, const int y, const Being *const excluded, const AllowSort allowSort) const @@ -1178,7 +1178,7 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, bool ActorManager::validateBeing(const Being *const aroundBeing, Being *const being, - const ActorType::Type &type, + const ActorTypeT &type, const Being* const excluded, const int maxCost) const { |