From d0cea553df6bc73497197aeec46260869a68a140 Mon Sep 17 00:00:00 2001 From: lotodore Date: Thu, 25 Oct 2007 20:35:57 +0000 Subject: [PATCH] Fixed boost string comparison. Oo. --- src/core/common/avatarmanager.cpp | 6 +++--- src/net/common/ircthread.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/common/avatarmanager.cpp b/src/core/common/avatarmanager.cpp index ab701767..f0784457 100644 --- a/src/core/common/avatarmanager.cpp +++ b/src/core/common/avatarmanager.cpp @@ -95,11 +95,11 @@ AvatarManager::OpenAvatarFileForChunkRead(const std::string &fileName, unsigned { path filePath(fileName); string ext(extension(filePath)); - if (boost::algorithm::iequals(ext, ".png") == 0) + if (boost::algorithm::iequals(ext, ".png")) outFileType = AVATAR_FILE_TYPE_PNG; - else if (boost::algorithm::iequals(ext, ".jpg") == 0 || boost::algorithm::iequals(ext, ".jpeg") == 0) + else if (boost::algorithm::iequals(ext, ".jpg") || boost::algorithm::iequals(ext, ".jpeg")) outFileType = AVATAR_FILE_TYPE_JPG; - else if (boost::algorithm::iequals(ext, ".gif") == 0) + else if (boost::algorithm::iequals(ext, ".gif")) outFileType = AVATAR_FILE_TYPE_GIF; boost::shared_ptr fileState(new AvatarFileState); fileState->inputStream.open(fileName.c_str(), ios_base::in | ios_base::binary); diff --git a/src/net/common/ircthread.cpp b/src/net/common/ircthread.cpp index 3ba2c862..b477b2e5 100644 --- a/src/net/common/ircthread.cpp +++ b/src/net/common/ircthread.cpp @@ -157,7 +157,7 @@ irc_event_channel(irc_session_t *session, const char * /*irc_event*/, const char { IrcContext *context = (IrcContext *) irc_get_ctx(session); - if (count >= 2 && boost::algorithm::iequals(context->channel, params[0]) == 0) // check whether this message is for our channel + if (count >= 2 && boost::algorithm::iequals(context->channel, params[0])) // check whether this message is for our channel { // Signal the message (if any) to GUI. if (*params[1] != 0)