summaryrefslogtreecommitdiffstats
path: root/engine
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 /engine
parentRewrite minimal flatland init (diff)
downloadflatland-2773a84abdaaebcc2204aacbfd044c1e03806532.tar.gz
flatland-2773a84abdaaebcc2204aacbfd044c1e03806532.zip
Enable more compiler warnings
Diffstat (limited to 'engine')
-rw-r--r--engine/component.cpp4
-rw-r--r--engine/surface.cpp9
2 files changed, 5 insertions, 8 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);