From ca84516fa80cfca35da7df71ea04423780028212 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 11 Jul 2009 16:54:49 +0000 Subject: Make copy() a non-const method. --- libdimensionxx/objects.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libdimensionxx/objects.cpp') diff --git a/libdimensionxx/objects.cpp b/libdimensionxx/objects.cpp index 6a13b35..2272586 100644 --- a/libdimensionxx/objects.cpp +++ b/libdimensionxx/objects.cpp @@ -41,13 +41,13 @@ namespace Dimension // Shallow copy a sphere Object* - Sphere::copy() const + Sphere::copy() { return new Sphere(*this); } // Protected copy constructor - Sphere::Sphere(const Sphere& sphere) + Sphere::Sphere(Sphere& sphere) : Object(sphere) { } @@ -70,13 +70,13 @@ namespace Dimension // Shallow copy a cube Object* - Cube::copy() const + Cube::copy() { return new Cube(*this); } // Protected copy constructor - Cube::Cube(const Cube& sphere) + Cube::Cube(Cube& sphere) : Object(sphere) { } } -- cgit v1.2.3