summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/chat.cpp2
-rw-r--r--src/fs/virtfs/tools.cpp4
-rw-r--r--src/gui/windows/chatwindow.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index c0aea0179..40ff966be 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -241,7 +241,7 @@ static bool splitWhisper(const std::string &args,
toLower(playerName);
toLower(tempNick);
- if (tempNick.compare(playerName) == 0 || args.empty())
+ if (tempNick == playerName || args.empty())
return false;
return true;
diff --git a/src/fs/virtfs/tools.cpp b/src/fs/virtfs/tools.cpp
index b0d6ce067..7e572ecc3 100644
--- a/src/fs/virtfs/tools.cpp
+++ b/src/fs/virtfs/tools.cpp
@@ -47,7 +47,7 @@ namespace VirtFs
const size_t len = str.size();
if (len > ext.length() &&
- (ext.compare(str.substr(len - ext.length())) == 0))
+ ext == str.substr(len - ext.length()))
{
const std::string file = path + str;
const std::string realPath = VirtFs::getRealDir(file);
@@ -66,7 +66,7 @@ namespace VirtFs
const std::string str = *i;
const size_t len = str.size();
if (len > ext.length() &&
- (ext.compare(str.substr(len - ext.length())) == 0))
+ ext == str.substr(len - ext.length()))
{
const std::string file = path + str;
const std::string realPath = VirtFs::getRealDir(file);
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 8ef8e9f75..88d4d3fc5 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1093,7 +1093,7 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
toLower(playerName);
toLower(tempNick);
- if (tempNick.compare(playerName) == 0)
+ if (tempNick == playerName)
return;
WhisperTab *tab = nullptr;
@@ -1190,7 +1190,7 @@ WhisperTab *ChatWindow::addWhisperTab(const std::string &caption,
const TabMap::const_iterator i = mWhispers.find(tempNick);
WhisperTab *ret = nullptr;
- if (tempNick.compare(playerName) == 0)
+ if (tempNick == playerName)
return nullptr;
if (i != mWhispers.end())
@@ -1227,7 +1227,7 @@ WhisperTab *ChatWindow::getWhisperTab(const std::string &nick) const
const TabMap::const_iterator i = mWhispers.find(tempNick);
WhisperTab *ret = nullptr;
- if (tempNick.compare(playerName) == 0)
+ if (tempNick == playerName)
return nullptr;
if (i != mWhispers.end())