src/extPrograms.cc

changeset 768
29e6c5552388
parent 757
8ab9fa53142b
child 786
71d786ce0dcc
--- a/src/extPrograms.cc	Mon May 05 17:18:01 2014 +0300
+++ b/src/extPrograms.cc	Fri May 09 12:06:56 2014 +0300
@@ -168,16 +168,16 @@
 //
 static void writeObjects (const LDObjectList& objects, QFile& f)
 {
-	for (LDObject* obj : objects)
+	for (LDObjectPtr obj : objects)
 	{
 		if (obj->type() == LDObject::ESubfile)
 		{
-			LDSubfile* ref = static_cast<LDSubfile*> (obj);
+			LDSubfilePtr ref = obj.staticCast<LDSubfile>();
 			LDObjectList objs = ref->inlineContents (true, false);
 
 			writeObjects (objs, f);
 
-			for (LDObject* obj : objs)
+			for (LDObjectPtr obj : objs)
 				obj->destroy();
 		}
 		else
@@ -219,7 +219,7 @@
 {
 	LDObjectList objects;
 
-	for (LDObject* obj : getCurrentDocument()->objects())
+	for (LDObjectPtr obj : getCurrentDocument()->objects())
 	{
 		if (not obj->isColored() || obj->color() != colnum)
 			continue;
@@ -315,7 +315,7 @@
 	// Insert the new objects
 	getCurrentDocument()->clearSelection();
 
-	for (LDObject* obj : objs)
+	for (LDObjectPtr obj : objs)
 	{
 		if (not obj->isScemantic())
 		{

mercurial