pmc/cube.cc
changeset 54 c064ce9f40f5
parent 46 4b9e1ac40246
child 65 76514757b0d6
--- a/pmc/cube.cc
+++ b/pmc/cube.cc
@@ -23,6 +23,8 @@
     P[5] = new Vector (125, 25);
     P[6] = new Vector (125, 125);
     P[7] = new Vector (25, 125);
+
+    refCounter++;
 }
 
 Cube::Cube (Surface * s, Vector & p1, Vector & p2, Vector & p3, Vector & p4, int h)
@@ -39,9 +41,11 @@
     P[3] = new Vector (p4);
 
     for (int i = 0; i < 4; i++) {
-        P[4 + i] = new Vector (*P[i]);
+        P[4 + i] = new Vector ();
         *P[4 + i] = *P[i] + location;
     }
+
+    refCounter++;
 }
 
 Cube::Cube (Surface * s, Vector p[4], int h)
@@ -57,6 +61,13 @@
         P[4 + i] = new Vector (*P[i]);
         *P[4 + i] = *P[i] + location;
     }
+
+    refCounter++;
+}
+
+Cube::Cube (const Cube & copy)
+{
+    fprintf (stderr, "Copy Constructor in Cube disabled...\n");
 }
 
 Cube::~Cube ()