summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-22 00:17:03 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-22 00:46:00 +0300
commite26c01fe66bc698555fdee9d681b3abd6822848a (patch)
treee74773ce1c66a714ee933d8228d94d205a37aa43 /src/gui
parentd181a2fb30ac73173fba851d4b2f7ca6f7d46ca0 (diff)
downloadmv-e26c01fe66bc698555fdee9d681b3abd6822848a.tar.gz
mv-e26c01fe66bc698555fdee9d681b3abd6822848a.tar.bz2
mv-e26c01fe66bc698555fdee9d681b3abd6822848a.tar.xz
mv-e26c01fe66bc698555fdee9d681b3abd6822848a.zip
Remove some parentheses.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fonts/textchunk.cpp4
-rw-r--r--src/gui/fonts/textchunksmall.cpp5
-rw-r--r--src/gui/mouseoverlink.h4
-rw-r--r--src/gui/viewport.cpp4
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp8
-rw-r--r--src/gui/widgets/widget.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp2
9 files changed, 17 insertions, 16 deletions
diff --git a/src/gui/fonts/textchunk.cpp b/src/gui/fonts/textchunk.cpp
index 694790881..22dcd18dc 100644
--- a/src/gui/fonts/textchunk.cpp
+++ b/src/gui/fonts/textchunk.cpp
@@ -89,8 +89,8 @@ TextChunk::~TextChunk()
bool TextChunk::operator==(const TextChunk &restrict chunk) const
{
- return (chunk.text == text && chunk.color == color
- && chunk.color2 == color2);
+ return chunk.text == text && chunk.color == color
+ && chunk.color2 == color2;
}
void TextChunk::generate(TTF_Font *restrict const font,
diff --git a/src/gui/fonts/textchunksmall.cpp b/src/gui/fonts/textchunksmall.cpp
index c7fbf6051..73e8ad386 100644
--- a/src/gui/fonts/textchunksmall.cpp
+++ b/src/gui/fonts/textchunksmall.cpp
@@ -50,8 +50,9 @@ TextChunkSmall &TextChunkSmall::operator=(const TextChunkSmall &chunk)
bool TextChunkSmall::operator==(const TextChunkSmall &chunk) const
{
- return (chunk.text == text && chunk.color == color
- && chunk.color2 == color2);
+ return chunk.text == text &&
+ chunk.color == color &&
+ chunk.color2 == color2;
}
bool TextChunkSmall::operator<(const TextChunkSmall &chunk) const
diff --git a/src/gui/mouseoverlink.h b/src/gui/mouseoverlink.h
index a26d38d6b..758d02b6e 100644
--- a/src/gui/mouseoverlink.h
+++ b/src/gui/mouseoverlink.h
@@ -39,10 +39,10 @@ struct MouseOverLink final
bool operator() (const BrowserLink &link) const
{
- return (mX >= link.x1 &&
+ return mX >= link.x1 &&
mX < link.x2 &&
mY >= link.y1 &&
- mY < link.y2);
+ mY < link.y2;
}
const int mX;
const int mY;
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 168ec317a..5715eae3a 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -467,8 +467,8 @@ bool Viewport::leftMouseAction()
case ActorType::SkillUnit:
if (!stopAttack)
{
- if ((localPlayer->withinAttackRange(mHoverBeing) ||
- inputManager.isActionActive(InputAction::ATTACK)))
+ if (localPlayer->withinAttackRange(mHoverBeing) ||
+ inputManager.isActionActive(InputAction::ATTACK))
{
validateSpeed();
if (!mStatsReUpdated && localPlayer != mHoverBeing)
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index df46014a3..d09a6b3cb 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -873,7 +873,7 @@ void Button::keyReleased(KeyEvent& event)
bool Button::isPressed2() const
{
- return (mPressed || isPressed());
+ return mPressed || isPressed();
}
bool Button::isPressed() const
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 3d5c3829f..8dd0f1210 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -101,7 +101,7 @@ namespace
return item1->getInvIndex() <
item2->getInvIndex();
}
- return (name1 < name2);
+ return name1 < name2;
}
} itemAlphaInvSorter;
@@ -151,7 +151,7 @@ namespace
return pair1->mItem->getInvIndex() <
pair2->mItem->getInvIndex();
}
- return (name1 < name2);
+ return name1 < name2;
}
return w1 < w2;
}
@@ -181,7 +181,7 @@ namespace
return pair1->mItem->getInvIndex() <
pair2->mItem->getInvIndex();
}
- return (name1 < name2);
+ return name1 < name2;
}
return c1 < c2;
}
@@ -211,7 +211,7 @@ namespace
return pair1->mItem->getInvIndex() <
pair2->mItem->getInvIndex();
}
- return (name1 < name2);
+ return name1 < name2;
}
return t1 < t2;
}
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index 8b49fddfd..47d2e0f5b 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -184,7 +184,7 @@ bool Widget::isFocused() const
if (mFocusHandler == nullptr)
return false;
- return (mFocusHandler->isFocused(this));
+ return mFocusHandler->isFocused(this);
}
void Widget::setFocusable(const bool focusable)
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 27caa2019..cd688be9b 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -558,7 +558,7 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
const bool mod = (isStorageActive() &&
inputManager.isActionActive(InputAction::STOP_ATTACK));
- const bool mod2 = ((tradeWindow != nullptr) &&
+ const bool mod2 = (tradeWindow != nullptr &&
tradeWindow->isWindowVisible() &&
inputManager.isActionActive(InputAction::STOP_ATTACK));
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 143a625e7..66f4e0550 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -549,5 +549,5 @@ bool TradeWindow::checkItem(const Item *const item) const
bool TradeWindow::isInpupFocused() const
{
- return ((mMoneyField != nullptr) && mMoneyField->isFocused());
+ return mMoneyField != nullptr && mMoneyField->isFocused();
}