summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-21 22:44:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-21 22:45:15 +0300
commit42f47e483da19079a937c4801ca94bd62d8dc970 (patch)
tree56dc96737e01e04d54357ce7118de3a1f000c516 /src/gui/windows
parent2d8b9246c8003f1d32ba396bc19cc11bc5a595b2 (diff)
downloadplus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.gz
plus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.bz2
plus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.xz
plus-42f47e483da19079a937c4801ca94bd62d8dc970.zip
Remove useless else.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp11
-rw-r--r--src/gui/windows/emotewindow.cpp3
-rw-r--r--src/gui/windows/socialwindow.cpp5
-rw-r--r--src/gui/windows/tradewindow.cpp9
-rw-r--r--src/gui/windows/whoisonline.cpp7
5 files changed, 10 insertions, 25 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 7992c6262..a3032de54 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -878,10 +878,8 @@ void ChatWindow::keyPressed(KeyEvent &event)
mChatInput->setCaretPosition(0);
return;
}
- else
- {
- mChatHistoryIndex --;
- }
+
+ mChatHistoryIndex --;
unsigned int f = 0;
const std::list<std::string> &rows = tab->getRows();
@@ -1313,10 +1311,7 @@ ChatTab *ChatWindow::addChatTab(const std::string &name,
chatHandler->joinChannel(name);
return tab;
}
- else
- {
- return addWhisperTab(name, name, switchTo);
- }
+ return addWhisperTab(name, name, switchTo);
}
void ChatWindow::postConnection()
diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp
index e82d9986f..f4f720535 100644
--- a/src/gui/windows/emotewindow.cpp
+++ b/src/gui/windows/emotewindow.cpp
@@ -233,8 +233,7 @@ std::string EmoteWindow::getSelectedFont() const
if (index == 0)
return "##b";
- else
- return "##B";
+ return "##B";
}
void EmoteWindow::clearFont()
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index b6b635c1c..aa240498d 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -542,10 +542,7 @@ int SocialWindow::getPortalIndex(const int x, const int y)
return static_cast<SocialNavigationTab*>(
mNavigation)->getPortalIndex(x, y);
}
- else
- {
- return -1;
- }
+ return -1;
}
void SocialWindow::addPortal(const int x, const int y)
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index b86d86aa3..143a625e7 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -174,12 +174,9 @@ void TradeWindow::setMoney(const int amount)
close();
return;
}
- else
- {
- mMoneyLabel->setForegroundColorAll(
- getThemeColor(ThemeColorId::WARNING),
- getThemeColor(ThemeColorId::WARNING_OUTLINE));
- }
+ mMoneyLabel->setForegroundColorAll(
+ getThemeColor(ThemeColorId::WARNING),
+ getThemeColor(ThemeColorId::WARNING_OUTLINE));
}
else
{
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 79fe66a4f..1401ec280 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -776,11 +776,8 @@ const std::string WhoIsOnline::prepareNick(const std::string &restrict nick,
return strprintf("@@%s|##%s%s (%d)@@", text.c_str(),
color.c_str(), text.c_str(), level);
}
- else
- {
- return strprintf("@@%s|##%s%s@@", text.c_str(),
- color.c_str(), text.c_str());
- }
+ return strprintf("@@%s|##%s%s@@", text.c_str(),
+ color.c_str(), text.c_str());
}
void WhoIsOnline::optionChanged(const std::string &name)