aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cObject.cpp9
-rw-r--r--cObject.h2
-rw-r--r--cWiremesh.cpp11
3 files changed, 4 insertions, 18 deletions
diff --git a/cObject.cpp b/cObject.cpp
index 8f9f6fa..cfd433b 100644
--- a/cObject.cpp
+++ b/cObject.cpp
@@ -1,10 +1,7 @@
#include "cObject.h"
-cObject::cObject(int _sx, int _sy)
+cObject::cObject(int _sx, int _sy) : pos({0,0}) , bSizeSet(false)
{
- bSizeSet = false;
-
- pos = {0,0};
setSize(_sx, _sy);
}
@@ -37,10 +34,6 @@ sObject cObject::getObject()
}
//protected
-cObject::cObject()
-{
- bSizeSet = false;
-}
void cObject::setSize(int _sx, int _sy)
{
diff --git a/cObject.h b/cObject.h
index d0947da..a2b269a 100644
--- a/cObject.h
+++ b/cObject.h
@@ -61,7 +61,7 @@ public:
virtual void onChar(unsigned char _c){}
protected: //For child classes
- cObject();
+ cObject() : pos({0,0}) , bSizeSet(false){}
/** For inheriting classes: sets size of framebuffer
*/
void setSize(int _sx, int _sy);
diff --git a/cWiremesh.cpp b/cWiremesh.cpp
index 085f366..62fee0d 100644
--- a/cWiremesh.cpp
+++ b/cWiremesh.cpp
@@ -1,15 +1,8 @@
#include "cWiremesh.h"
-cWiremesh::cWiremesh()
-{
- position = {0,0,0};
- angle = {0,0,0};
-}
+cWiremesh::cWiremesh() : position({0,0,0}), angle({0,0,0}) { }
-cWiremesh::~cWiremesh()
-{
-
-}
+cWiremesh::~cWiremesh() { }
void cWiremesh::addVector(sCoord3d _origin, sCoord3d _vector, char _char, WORD _color)
{