summaryrefslogtreecommitdiff
path: root/src/spellmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-11 17:35:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-11 18:00:22 +0300
commit52c7195a8ee91f95ef134d9798a47ea313df16c8 (patch)
treeca1f32cfadce611a1820b50f5386c02cd2ce06ae /src/spellmanager.cpp
parentf1b82c1b06604c2c1eed750a6c980aa0b5355560 (diff)
downloadmanaverse-52c7195a8ee91f95ef134d9798a47ea313df16c8.tar.gz
manaverse-52c7195a8ee91f95ef134d9798a47ea313df16c8.tar.bz2
manaverse-52c7195a8ee91f95ef134d9798a47ea313df16c8.tar.xz
manaverse-52c7195a8ee91f95ef134d9798a47ea313df16c8.zip
Second part of checks from Parasoft C++ Test.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r--src/spellmanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index c8f6fd836..5d465e244 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -203,20 +203,20 @@ std::string SpellManager::parseCommand(std::string command,
bool found = false;
- int idx = static_cast<int>(command.find("<TARGET>"));
- if (idx >= 0)
+ size_t idx = command.find("<TARGET>");
+ if (idx != std::string::npos)
{
found = true;
command = replaceAll(command, "<TARGET>", name);
}
- idx = static_cast<int>(command.find("<TARGETID>"));
- if (idx >= 0)
+ idx = command.find("<TARGETID>");
+ if (idx != std::string::npos)
{
found = true;
command = replaceAll(command, "<TARGETID>", id);
}
- idx = static_cast<int>(command.find("<TARGETORSELF>"));
- if (idx >= 0)
+ idx = command.find("<TARGETORSELF>");
+ if (idx != std::string::npos)
{
found = true;
command = replaceAll(command, "<TARGETORSELF>", name2);