From 52c7195a8ee91f95ef134d9798a47ea313df16c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Oct 2013 17:35:24 +0300 Subject: Second part of checks from Parasoft C++ Test. --- src/spellmanager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/spellmanager.cpp') 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(command.find("")); - if (idx >= 0) + size_t idx = command.find(""); + if (idx != std::string::npos) { found = true; command = replaceAll(command, "", name); } - idx = static_cast(command.find("")); - if (idx >= 0) + idx = command.find(""); + if (idx != std::string::npos) { found = true; command = replaceAll(command, "", id); } - idx = static_cast(command.find("")); - if (idx >= 0) + idx = command.find(""); + if (idx != std::string::npos) { found = true; command = replaceAll(command, "", name2); -- cgit v1.2.3-60-g2f50