summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-25 12:19:06 +0100
committerNao Pross <naopross@thearcway.org>2019-01-25 12:19:06 +0100
commit2773a84abdaaebcc2204aacbfd044c1e03806532 (patch)
tree8410bb81d3c67762b91b08f1e6fa847e47945e95
parentRewrite minimal flatland init (diff)
downloadflatland-2773a84abdaaebcc2204aacbfd044c1e03806532.tar.gz
flatland-2773a84abdaaebcc2204aacbfd044c1e03806532.zip
Enable more compiler warnings
-rw-r--r--engine/component.cpp4
-rw-r--r--engine/surface.cpp9
-rw-r--r--ninja/rules.ninja2
3 files changed, 6 insertions, 9 deletions
diff --git a/engine/component.cpp b/engine/component.cpp
index 961854c..a3eccae 100644
--- a/engine/component.cpp
+++ b/engine/component.cpp
@@ -21,9 +21,9 @@ component::~component()
void component::set_parent(component *parent)
{
- if (parent == 0)
+ if (parent == 0) {
// TODO set screen as parent layer
- ;
+ }
this->m_parent = m_parent;
}
diff --git a/engine/surface.cpp b/engine/surface.cpp
index 31f6388..642b0a7 100644
--- a/engine/surface.cpp
+++ b/engine/surface.cpp
@@ -6,8 +6,7 @@ using namespace std;
using namespace flat;
surface::surface(const char *filename, uint32_t format, SDL_Surface *parent)
-
- : flat::core::labelled(filename, true), parent(parent), hide(false)
+ : core::labelled(filename, true), parent(parent), hide(false)
{
cout << "surface: loading " << filename << endl;
sdl_surface = loadOptimizedSurface(filename, format);
@@ -33,8 +32,7 @@ surface::surface(const char *filename, uint32_t format, SDL_Surface *parent)
}
surface::surface(SDL_Surface *sdl_surface, SDL_Surface *parent)
-
- : flat::core::object(), parent(parent), hide(false)
+ : core::object(), parent(parent), hide(false)
{
this->sdl_surface = new SDL_Surface(*sdl_surface);
@@ -54,8 +52,7 @@ surface::surface(SDL_Surface *sdl_surface, SDL_Surface *parent)
}
surface::surface(const surface &sprite)
-
- : flat::core::object(sprite), parent(sprite.parent),
+ : core::object(sprite), parent(sprite.parent),
hide(sprite.hide)
{
offset = new SDL_Rect(*sprite.offset);
diff --git a/ninja/rules.ninja b/ninja/rules.ninja
index 6674672..ce9dc63 100644
--- a/ninja/rules.ninja
+++ b/ninja/rules.ninja
@@ -1,5 +1,5 @@
includes = -I lib/include -I engine/include
-cflags = -g -Wall -pedantic -fPIC -std=c++17 -DDEBUG $includes
+cflags = -g -Wall -Wextra -pedantic -fPIC -std=c++17 -DDEBUG $includes
libs = -lSDL2 lib/libmm/build/libmm.a lib/libwsdl2/build/libwsdl2.a
lflags = $libs