pmc/cube.cc
changeset 36 f52a9deddfc0
parent 35 024c2932a31f
child 42 83b8151b966d
--- a/pmc/cube.cc
+++ b/pmc/cube.cc
@@ -32,12 +32,8 @@
 
 void Cube::move (Vector location)
 {
-    Vector *p_tmp;
-
     for (int i = 0; i < 8; i++) {
-        p_tmp = new Vector (*P[i] + location);
-        delete P[i];
-        P[i] = p_tmp;
+        *P[i] = *P[i] + location;
     }
 }