Resolve some warnings pointed out by Codacy

master
Nicole Collings 2019-07-22 14:56:19 -07:00
parent bfdf58cfac
commit 4d912949d4
3 changed files with 8 additions and 8 deletions

View File

@ -4,11 +4,11 @@
#include "StatGraph.h"
StatGraph::StatGraph(std::string title, int graphLength, int graphScale, Texture *graphTex, Texture *textTex) :
StatGraph(std::move(title), 244, 64, graphLength, graphScale, graphTex, textTex) {}
StatGraph::StatGraph(const std::string& title, int graphLength, int graphScale, Texture *graphTex, Texture *textTex) :
StatGraph(title, 244, 64, graphLength, graphScale, graphTex, textTex) {}
StatGraph::StatGraph(std::string title, int xSize, int ySize, int graphLength, int graphScale, Texture* graphTex, Texture* textTex) :
title(std::move(title)),
StatGraph::StatGraph(const std::string& title, int xSize, int ySize, int graphLength, int graphScale, Texture* graphTex, Texture* textTex) :
title(title),
background({0.1, 0.1, 0.1, 0.2}, {0.1, 0.1, 0.1, 0.2}, {0.1, 0.1, 0.1, 0.7}, {0.1, 0.1, 0.1, 0.7}),
graph(graphTex, graphLength, graphScale, true),
text(textTex) {

View File

@ -13,8 +13,8 @@
class StatGraph : public Drawable {
public:
StatGraph(std::string title, int xSize, int ySize, int graphLength, int graphScale, Texture* graphTex, Texture* textTex);
StatGraph(std::string title, int graphLength, int graphScale, Texture* graphTex, Texture* textTex);
StatGraph(const std::string& title, int xSize, int ySize, int graphLength, int graphScale, Texture* graphTex, Texture* textTex);
StatGraph(const std::string& title, int graphLength, int graphScale, Texture* graphTex, Texture* textTex);
void setPos(glm::vec2 pos);
void update(float value);

View File

@ -38,8 +38,8 @@ private:
std::shared_ptr<AtlasRef> playerFrontTex, playerBackTex, shadowTex;
int id = 0;
DrawableGroup* entities;
LocalWorld* world;
DrawableGroup* entities = nullptr;
LocalWorld* world = nullptr;
ServerConnection& connection;
};