diff --git a/src/gamebase.cpp b/src/gamebase.cpp index 0568f38..7fd05d6 100644 --- a/src/gamebase.cpp +++ b/src/gamebase.cpp @@ -73,7 +73,7 @@ namespace cloonel { ///------------------------------------------------------------------------ ///------------------------------------------------------------------------ - GameBase::~GameBase() { + GameBase::~GameBase() noexcept { } ///------------------------------------------------------------------------ diff --git a/src/inputbag.cpp b/src/inputbag.cpp index 9e6dc5c..e63b5b4 100644 --- a/src/inputbag.cpp +++ b/src/inputbag.cpp @@ -79,7 +79,7 @@ namespace cloonel { ///-------------------------------------------------------------------------- ///-------------------------------------------------------------------------- - InputBag::~InputBag() { + InputBag::~InputBag() noexcept { } ///-------------------------------------------------------------------------- diff --git a/src/observersmanager.hpp b/src/observersmanager.hpp index c8e3ba9..38a6934 100644 --- a/src/observersmanager.hpp +++ b/src/observersmanager.hpp @@ -60,9 +60,9 @@ namespace cloonel { Iterator& operator++ ( void ) { if (m_occupied.size() == m_pos) return *this; - auto itNext = std::find(m_occupied.begin() + m_pos + 1, m_occupied.end(), true); + auto itNext = std::find(m_occupied.begin() + static_cast::difference_type>(m_pos + 1), m_occupied.end(), true); if (m_occupied.end() != itNext) - m_pos = itNext - m_occupied.begin(); + m_pos = static_cast(itNext - m_occupied.begin()); else m_pos = m_occupied.size(); return *this; @@ -138,7 +138,7 @@ namespace cloonel { auto lastNull = std::find(m_occupied.rbegin(), m_occupied.rend(), false); if (m_occupied.rend() != lastNull) { - const std::size_t newSize = m_occupied.size() - (lastNull - m_occupied.rbegin()) + 1; + const std::size_t newSize = m_occupied.size() - static_cast(lastNull - m_occupied.rbegin()) + 1; m_occupied.resize(newSize); m_list.resize(newSize); } diff --git a/src/sdlmain.cpp b/src/sdlmain.cpp index fb621b1..5f3601e 100644 --- a/src/sdlmain.cpp +++ b/src/sdlmain.cpp @@ -22,6 +22,7 @@ #include "sizenotifiable.hpp" #include "sizeratio.hpp" #include +#include namespace cloonel { struct SDLMain::LocalData { diff --git a/src/sdlmain.hpp b/src/sdlmain.hpp index 2f4a55e..bbdd7b6 100644 --- a/src/sdlmain.hpp +++ b/src/sdlmain.hpp @@ -22,6 +22,7 @@ #include "vector.hpp" #include +#include struct SDL_Renderer; diff --git a/src/vector.hpp b/src/vector.hpp index 832369b..a649080 100644 --- a/src/vector.hpp +++ b/src/vector.hpp @@ -75,21 +75,21 @@ namespace cloonel { Vector::type, S> operator* ( Vector parA, const Vector& parB ) __attribute__((pure)); template Vector::type, S> operator/ ( Vector parA, const Vector& parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator+ ( U parA, const Vector& parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator- ( U parA, const Vector& parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator* ( U parA, const Vector& parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator/ ( U parA, const Vector& parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator+ ( const Vector& parA, U parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator- ( const Vector& parA, U parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator* ( const Vector& parA, U parB ) __attribute__((pure)); - template + template ::value>::type> Vector::type, S> operator/ ( const Vector& parA, U parB ) __attribute__((pure)); template diff --git a/src/vector.inl b/src/vector.inl index e6370ef..98e3d12 100644 --- a/src/vector.inl +++ b/src/vector.inl @@ -22,7 +22,7 @@ namespace cloonel { ///------------------------------------------------------------------------- template Vector::Vector (T parValue) { - for (int z = 0; z < S; ++z) { + for (uint32_t z = 0; z < S; ++z) { m_mem[z] = parValue; } } @@ -142,23 +142,23 @@ namespace cloonel { ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- - template + template Vector::type, S> operator+ (T parA, const Vector& parB) { return parB + parA; } - template + template Vector::type, S> operator- (T parA, const Vector& parB) { return Vector(parA) - parB; } - template + template Vector::type, S> operator* (T parA, const Vector& parB) { return parB * parA; } - template + template Vector::type, S> operator/ (T parA, const Vector& parB) { return Vector(parA) / parB; } - template + template Vector::type, S> operator+ (const Vector& parA, U parB) { typedef typename std::common_type::type RetType; Vector retVal; @@ -167,7 +167,7 @@ namespace cloonel { } return retVal; } - template + template Vector::type, S> operator- (const Vector& parA, U parB) { typedef typename std::common_type::type RetType; Vector retVal; @@ -176,7 +176,7 @@ namespace cloonel { } return retVal; } - template + template Vector::type, S> operator* (const Vector& parA, U parB) { typedef typename std::common_type::type RetType; Vector retVal; @@ -185,7 +185,7 @@ namespace cloonel { } return retVal; } - template + template Vector::type, S> operator/ (const Vector& parA, U parB) { typedef typename std::common_type::type RetType; Vector retVal;