Fix compiler warnings in examples when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type
This commit is contained in:
parent
879296f71b
commit
f39ed94419
43 changed files with 75 additions and 73 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue