summaryrefslogtreecommitdiff
path: root/Examples/lua/owner/example.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/lua/owner/example.cxx')
-rw-r--r--Examples/lua/owner/example.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Examples/lua/owner/example.cxx b/Examples/lua/owner/example.cxx
index bce484aea..c2c073d79 100644
--- a/Examples/lua/owner/example.cxx
+++ b/Examples/lua/owner/example.cxx
@@ -39,12 +39,15 @@ Square* createSquare(double w)
return new Square(w);
}
-ShapeOwner::ShapeOwner() {printf(" ShapeOwner(%p)\n",this);}
+ShapeOwner::ShapeOwner() {
+ printf(" ShapeOwner(%p)\n", (void *)this);
+}
+
ShapeOwner::~ShapeOwner()
{
- printf(" ~ShapeOwner(%p)\n",this);
- for(unsigned i=0;i<shapes.size();i++)
- delete shapes[i];
+ printf(" ~ShapeOwner(%p)\n", (void *)this);
+ for(unsigned i=0;i<shapes.size();i++)
+ delete shapes[i];
}
void ShapeOwner::add(Shape* ptr) // this method takes ownership of the object