src/basics.cc

changeset 768
29e6c5552388
parent 767
44f0d5322628
child 786
71d786ce0dcc
--- a/src/basics.cc	Mon May 05 17:18:01 2014 +0300
+++ b/src/basics.cc	Fri May 09 12:06:56 2014 +0300
@@ -225,13 +225,13 @@
 	if (not getCurrentDocument())
 		return;
 
-	for (LDObject* obj : getCurrentDocument()->objects())
+	for (LDObjectPtr obj : getCurrentDocument()->objects())
 		calcObject (obj);
 }
 
 // =============================================================================
 //
-void LDBoundingBox::calcObject (LDObject* obj)
+void LDBoundingBox::calcObject (LDObjectPtr obj)
 {
 	switch (obj->type())
 	{
@@ -246,10 +246,10 @@
 
 		case LDObject::ESubfile:
 		{
-			LDSubfile* ref = static_cast<LDSubfile*> (obj);
+			LDSubfilePtr ref = obj.staticCast<LDSubfile>();
 			LDObjectList objs = ref->inlineContents (true, false);
 
-			for (LDObject * obj : objs)
+			for (LDObjectPtr obj : objs)
 			{
 				calcObject (obj);
 				obj->destroy();
@@ -272,7 +272,7 @@
 
 // =============================================================================
 //
-LDBoundingBox& LDBoundingBox::operator<< (LDObject* obj)
+LDBoundingBox& LDBoundingBox::operator<< (LDObjectPtr obj)
 {
 	calcObject (obj);
 	return *this;

mercurial