summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-23 00:16:15 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-23 00:16:15 +0300
commit58b3fd0d0b80396912681386cba226d06a238364 (patch)
treedeb0330464c4e1873fb33259d75f42f881171930 /src/actormanager.cpp
parentc4948aec464e692da85cbe84cc5b77fc9adb1732 (diff)
downloadplus-58b3fd0d0b80396912681386cba226d06a238364.tar.gz
plus-58b3fd0d0b80396912681386cba226d06a238364.tar.bz2
plus-58b3fd0d0b80396912681386cba226d06a238364.tar.xz
plus-58b3fd0d0b80396912681386cba226d06a238364.zip
Replace some empty strings to std::string().
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index e33229f20..f052edd99 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -718,7 +718,8 @@ bool ActorManager::pickUpAll(const int x1, const int y1,
return false;
bool finded(false);
- const bool allowAll = mPickupItemsSet.find("") != mPickupItemsSet.end();
+ const bool allowAll = mPickupItemsSet.find(std::string()) !=
+ mPickupItemsSet.end();
if (!serverBuggy)
{
for_actorsm
@@ -818,7 +819,8 @@ bool ActorManager::pickUpNearest(const int x, const int y,
maxdist = maxdist * maxdist;
FloorItem *closestItem = nullptr;
int dist = 0;
- const bool allowAll = mPickupItemsSet.find("") != mPickupItemsSet.end();
+ const bool allowAll = mPickupItemsSet.find(std::string()) !=
+ mPickupItemsSet.end();
for_actorsm
{
@@ -1169,12 +1171,12 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing,
beingActorSorter.priorityBeings = &priorityMobsMap;
beingActorSorter.specialDistance = specialDistance;
beingActorSorter.attackRange = attackRange;
- if (ignoreAttackMobs.find("") != ignoreAttackMobs.end())
+ if (ignoreAttackMobs.find(std::string()) != ignoreAttackMobs.end())
ignoreDefault = true;
- StringIntMapCIter itr = attackMobsMap.find("");
+ StringIntMapCIter itr = attackMobsMap.find(std::string());
if (itr != attackMobsMap.end())
defaultAttackIndex = (*itr).second;
- itr = priorityMobsMap.find("");
+ itr = priorityMobsMap.find(std::string());
if (itr != priorityMobsMap.end())
defaultPriorityIndex = (*itr).second;
}
@@ -2054,7 +2056,7 @@ void ActorManager::storeAttackList() const
bool ActorManager::checkForPickup(const FloorItem *const item) const
{
- if (mPickupItemsSet.find("") != mPickupItemsSet.end())
+ if (mPickupItemsSet.find(std::string()) != mPickupItemsSet.end())
{
if (mIgnorePickupItemsSet.find(item->getName())
== mIgnorePickupItemsSet.end())
@@ -2072,7 +2074,7 @@ bool ActorManager::checkForPickup(const FloorItem *const item) const
bool ActorManager::checkDefaultPickup() const
{
- return mPickupItemsSet.find("") != mPickupItemsSet.end();
+ return mPickupItemsSet.find(std::string()) != mPickupItemsSet.end();
}
void ActorManager::updateEffects(const std::map<BeingTypeId, int> &addEffects,