diff --git a/src/Client/Raylib/Graphics/Graphics.cpp b/src/Client/Raylib/Graphics/Graphics.cpp index d8a400a8..b35c27ef 100644 --- a/src/Client/Raylib/Graphics/Graphics.cpp +++ b/src/Client/Raylib/Graphics/Graphics.cpp @@ -457,7 +457,7 @@ namespace Raylib { } Sprite::Sprite(Image image, float width, float height) - : _texture({0, 0, 0, 0}), + : _texture(), _width(width), _height(height) { @@ -620,11 +620,11 @@ namespace Raylib { Text::Text(std::string text, Vector2 position, float fontSize, Color color) : _text(std::move(text)), - _position(position), _fontSize(fontSize), + _currentFontSize(fontSize), _color(color), - _pixelPosition(position), - _currentFontSize(fontSize) + _position(position), + _pixelPosition(position) { } diff --git a/src/Client/Systems/CustomTypes.hpp b/src/Client/Systems/CustomTypes.hpp index 6a3a1206..d904b8d2 100644 --- a/src/Client/Systems/CustomTypes.hpp +++ b/src/Client/Systems/CustomTypes.hpp @@ -33,8 +33,8 @@ namespace Types { moveRects(_moveRects), attackRects(_attackRects), deadRects(_deadRects), - currentRectInList(0), - currentRectList(Types::RectListType::DEFAULTRECT) + currentRectList(Types::RectListType::DEFAULTRECT), + currentRectInList(0) { } Rect defaultRect; diff --git a/src/ECS/Registry.cpp b/src/ECS/Registry.cpp index 63a58dd9..5bf38040 100644 --- a/src/ECS/Registry.cpp +++ b/src/ECS/Registry.cpp @@ -113,8 +113,12 @@ std::vector> Registry::getFrontLayers() void Registry::initLayers(bool back) { - auto max = static_cast( - back ? BackLayers::BACKMAX : FrontLayers::FRONTMAX); + std::size_t max = 0; + if (back) { + max = static_cast(BackLayers::BACKMAX); + } else { + max = static_cast(FrontLayers::FRONTMAX); + } for (std::size_t i = 0; i < max; i++) { std::vector> &layers = diff --git a/src/ECS/SparseArray.hpp b/src/ECS/SparseArray.hpp index 17baa3a2..3518d206 100644 --- a/src/ECS/SparseArray.hpp +++ b/src/ECS/SparseArray.hpp @@ -30,7 +30,7 @@ class SparseArray { "SparseArrays::insert: ID out of bounds!"); } - if (_sparse[id] > -1) { + if (static_cast(_sparse[id]) > -1) { _dense[_sparse[id]] = value; _revSparse[_sparse[id]] = id; return; @@ -48,7 +48,7 @@ class SparseArray { "SparseArrays::erase: ID out of bounds!"); } std::size_t sparseValue = _sparse[id]; - if (sparseValue != -1) { + if (int(sparseValue) != -1) { removeDenses(id, sparseValue); } auto it = _sparse.begin();