diff options
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 12 |
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); |