summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-22 17:07:50 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-22 17:07:50 +0300
commit4aada89a99e81574db3e662b9c354cde0cd4440d (patch)
tree970264d1f52215ad563ce90fd4a86e92e8cbaddf /src/gui
parent04dd5dab7669440d4d5e4bb4d72002ab7fb38912 (diff)
downloadmv-4aada89a99e81574db3e662b9c354cde0cd4440d.tar.gz
mv-4aada89a99e81574db3e662b9c354cde0cd4440d.tar.bz2
mv-4aada89a99e81574db3e662b9c354cde0cd4440d.tar.xz
mv-4aada89a99e81574db3e662b9c354cde0cd4440d.zip
Fix style issues.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/color.h7
-rw-r--r--src/gui/windows/editserverdialog.cpp2
-rw-r--r--src/gui/windows/editserverdialog.h3
-rw-r--r--src/gui/windows/skilldialog.cpp2
4 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/color.h b/src/gui/color.h
index 26552a88e..e555574dc 100644
--- a/src/gui/color.h
+++ b/src/gui/color.h
@@ -96,7 +96,7 @@ class Color final
*
* @param color The color to initialise the object with.
*/
- constexpr Color(const unsigned int color) :
+ explicit constexpr Color(const unsigned int color) :
r((color >> 16) & 0xFFU),
g((color >> 8) & 0xFFU),
b(color & 0xFFU),
@@ -204,7 +204,10 @@ class Color final
*/
constexpr bool operator==(const Color& color) const
{
- return r == color.r && g == color.g && b == color.b && a == color.a;
+ return r == color.r &&
+ g == color.g &&
+ b == color.b &&
+ a == color.a;
}
/**
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 2291c9028..9e49cc484 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -41,7 +41,7 @@
#include "debug.h"
EditServerDialog::EditServerDialog(ServerDialog *const parent,
- ServerInfo server,
+ const ServerInfo &server,
const int index) :
// TRANSLATORS: edit server dialog name
Window(_("Edit Server"), Modal_true, parent),
diff --git a/src/gui/windows/editserverdialog.h b/src/gui/windows/editserverdialog.h
index 5595c3120..dae326cd0 100644
--- a/src/gui/windows/editserverdialog.h
+++ b/src/gui/windows/editserverdialog.h
@@ -47,7 +47,8 @@ class EditServerDialog final : public Window,
public KeyListener
{
public:
- EditServerDialog(ServerDialog *const parent, ServerInfo server,
+ EditServerDialog(ServerDialog *const parent,
+ const ServerInfo &server,
const int index);
A_DELETE_COPY(EditServerDialog)
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 23dc82e46..d3d6c9272 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -346,7 +346,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName,
const std::string setTypeStr = XML::getProperty(set, "type", "");
SkillSetTypeT setType = SkillSetType::VerticalList;
- if (setTypeStr == "" ||
+ if (setTypeStr.empty() ||
setTypeStr == "list" ||
setTypeStr == "vertical")
{