summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/objects.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-16 01:16:23 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-16 01:16:23 +0000
commitc3619e541564d5133a3ccdaeb79588d37d46a3db (patch)
treeeede3c86f47098080fe206b84dbb6b59aa0e6a21 /libdimensionxx/objects.cpp
parent00997fa54c64b53618255b1e292d3db4d18b86af (diff)
downloaddimension-c3619e541564d5133a3ccdaeb79588d37d46a3db.tar.xz
Make copy() a const method.
Diffstat (limited to 'libdimensionxx/objects.cpp')
-rw-r--r--libdimensionxx/objects.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libdimensionxx/objects.cpp b/libdimensionxx/objects.cpp
index 7bedd92..fffa3c4 100644
--- a/libdimensionxx/objects.cpp
+++ b/libdimensionxx/objects.cpp
@@ -33,13 +33,13 @@ namespace Dimension
// Shallow copy a sphere
Object*
- Sphere::copy()
+ Sphere::copy() const
{
return new Sphere(*this);
}
// Protected copy constructor
- Sphere::Sphere(Sphere& sphere)
+ Sphere::Sphere(const Sphere& sphere)
: Object(sphere)
{ }
@@ -54,13 +54,13 @@ namespace Dimension
// Shallow copy a cube
Object*
- Cube::copy()
+ Cube::copy() const
{
return new Cube(*this);
}
// Protected copy constructor
- Cube::Cube(Cube& sphere)
- : Object(sphere)
+ Cube::Cube(const Cube& cube)
+ : Object(cube)
{ }
}