From 4aada89a99e81574db3e662b9c354cde0cd4440d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Dec 2016 17:07:50 +0300 Subject: Fix style issues. --- src/gui/color.h | 7 +++++-- src/gui/windows/editserverdialog.cpp | 2 +- src/gui/windows/editserverdialog.h | 3 ++- src/gui/windows/skilldialog.cpp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/gui') 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") { -- cgit v1.2.3-70-g09d2