fix: compiler warnings

This commit is contained in:
2021-09-02 10:48:14 +02:00
parent fe86bffc2e
commit 04d1e3c0bf
22 changed files with 74 additions and 79 deletions

View File

@@ -95,10 +95,10 @@ public:
void heal(float heal){ m_Health = std::min((float)getStats()->getMaxLife(), m_Health + heal); }
float getX() const{ return m_X; }
float setX(float x){ m_X = x; }
void setX(float x){ m_X = x; }
float getY() const{ return m_Y; }
float setY(float y){ m_Y = y; }
void setY(float y){ m_Y = y; }
Direction getDirection() const{ return m_Direction; }
void setDirection(Direction dir){ m_Direction = dir; }

View File

@@ -13,7 +13,7 @@ private:
game::TeamColor m_TeamColor = game::TeamColor::None;
std::uint32_t m_Gold = 0;
std::int32_t m_EXP;
std::int32_t m_EXP = 0;
std::string m_Name;
std::uint8_t m_ID;

View File

@@ -27,7 +27,7 @@ enum class TowerSize : bool{
};
enum class TowerPath : std::uint8_t{
Top = 1, // Base path
Top = 0, // Base path
Bottom
};

View File

@@ -160,7 +160,7 @@ public:
const MobList& getMobList() const{ return m_Mobs; }
MobList& getMobList(){ return m_Mobs; }
const Color& getTileColor(TilePtr tile) const;
const Color* getTileColor(TilePtr tile) const;
Team& getRedTeam();
const Team& getRedTeam() const;

View File

@@ -10,7 +10,7 @@ class ServerGame;
class ServerWorld : public game::World{
private:
game::MobID m_CurrentMobID = 0;
game::MobID m_CurrentMobID;
Server* m_Server;
public:
ServerWorld(Server* server, ServerGame* game);

View File

@@ -19,7 +19,7 @@ void pollEvents();
bool isCloseRequested();
const bool isMouseDown(int button);
bool isMouseDown(int button);
float getAspectRatio();
int getWindowWidth();