summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/resources/dye/dyepalette_replaceacolor.cpp5
-rw-r--r--src/resources/dye/dyepalette_replaceaoglcolor.cpp2
-rw-r--r--src/resources/dye/dyepalette_replacescolor.cpp6
-rw-r--r--src/resources/dye/dyepalette_replacesoglcolor.cpp2
8 files changed, 13 insertions, 16 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")
{
diff --git a/src/resources/dye/dyepalette_replaceacolor.cpp b/src/resources/dye/dyepalette_replaceacolor.cpp
index 898928128..cb379a4be 100644
--- a/src/resources/dye/dyepalette_replaceacolor.cpp
+++ b/src/resources/dye/dyepalette_replaceacolor.cpp
@@ -22,8 +22,6 @@
#include "resources/dye/dyepalette.h"
-#include "logger.h"
-
#ifndef SDL_BIG_ENDIAN
#include <SDL_endian.h>
#endif // SDL_BYTEORDER
@@ -162,7 +160,8 @@ void DyePalette::replaceAColorSimd(uint32_t *restrict pixels,
for (int ptr = 0; ptr < bufEnd; ptr += 8)
{
// __m256i base = _mm256_load_si256(reinterpret_cast<__m256i*>(pixels));
- __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>(&pixels[ptr]));
+ __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>(
+ &pixels[ptr]));
std::vector<DyeColor>::const_iterator it = mColors.begin();
while (it != it_end)
diff --git a/src/resources/dye/dyepalette_replaceaoglcolor.cpp b/src/resources/dye/dyepalette_replaceaoglcolor.cpp
index 869f54205..3b643bf92 100644
--- a/src/resources/dye/dyepalette_replaceaoglcolor.cpp
+++ b/src/resources/dye/dyepalette_replaceaoglcolor.cpp
@@ -24,8 +24,6 @@
#include "resources/dye/dyepalette.h"
-#include "logger.h"
-
#ifndef SDL_BIG_ENDIAN
#include <SDL_endian.h>
#endif // SDL_BYTEORDER
diff --git a/src/resources/dye/dyepalette_replacescolor.cpp b/src/resources/dye/dyepalette_replacescolor.cpp
index 0076484c0..94b7c1c5c 100644
--- a/src/resources/dye/dyepalette_replacescolor.cpp
+++ b/src/resources/dye/dyepalette_replacescolor.cpp
@@ -20,8 +20,6 @@
#include "resources/dye/dyepalette.h"
-#include "logger.h"
-
#ifndef SDL_BIG_ENDIAN
#include <SDL_endian.h>
#endif // SDL_BYTEORDER
@@ -159,7 +157,8 @@ void DyePalette::replaceSColorSimd(uint32_t *restrict pixels,
{
__m256i mask = _mm256_set1_epi32(0xffffff00);
// __m256i base = _mm256_load_si256(reinterpret_cast<__m256i*>(pixels));
- __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>(&pixels[ptr]));
+ __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>(
+ &pixels[ptr]));
std::vector<DyeColor>::const_iterator it = mColors.begin();
while (it != it_end)
@@ -220,7 +219,6 @@ void DyePalette::replaceSColorSimd(uint32_t *restrict pixels,
++ it;
}
}
-// logger->log("end");
}
#endif // SIMD_SUPPORTED
diff --git a/src/resources/dye/dyepalette_replacesoglcolor.cpp b/src/resources/dye/dyepalette_replacesoglcolor.cpp
index ceffd664e..6425a3fe2 100644
--- a/src/resources/dye/dyepalette_replacesoglcolor.cpp
+++ b/src/resources/dye/dyepalette_replacesoglcolor.cpp
@@ -22,8 +22,6 @@
#include "resources/dye/dyepalette.h"
-#include "logger.h"
-
#ifndef SDL_BIG_ENDIAN
#include <SDL_endian.h>
#endif // SDL_BYTEORDER