Replaced Ref and RefCounter with std::shared_ptr<>
[supertux.git] / src / object / candle.cpp
index 84535f6..ec0ff01 100644 (file)
@@ -107,7 +107,11 @@ Candle::puff_smoke()
   Vector ppos = bbox.get_middle();
   Vector pspeed = Vector(0, -150);
   Vector paccel = Vector(0,0);
-  Sector::current()->add_object(new SpriteParticle("images/objects/particles/smoke.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_BACKGROUNDTILES+2));
+  Sector::current()->add_object(std::make_shared<SpriteParticle>("images/objects/particles/smoke.sprite",
+                                                                 "default",
+                                                                 ppos, ANCHOR_MIDDLE,
+                                                                 pspeed, paccel,
+                                                                 LAYER_BACKGROUNDTILES+2));
 }
 
 bool