[Scummvm-cvs-logs] CVS: scummvm/backends/fs/morphos abox-fs.cpp,1.8,1.9

Max Horn fingolfin at users.sourceforge.net
Sun Nov 21 05:26:22 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/fs/morphos
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12610/morphos

Modified Files:
	abox-fs.cpp 
Log Message:
Since we do ref counting on the nodes now, we can re-use the root nodes now

Index: abox-fs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/fs/morphos/abox-fs.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- abox-fs.cpp	20 Nov 2004 21:35:48 -0000	1.8
+++ abox-fs.cpp	21 Nov 2004 13:18:07 -0000	1.9
@@ -38,7 +38,7 @@
 		bool _isDirectory;
 		bool _isValid;
 		String _path;
-        
+
 	public:
 		ABoxFilesystemNode();
 		ABoxFilesystemNode(BPTR lock, CONST_STRPTR display_name = NULL);
@@ -140,7 +140,7 @@
 FSList ABoxFilesystemNode::listDir(ListMode mode) const
 {
 	FSList myList;
-        
+
 	if (!_isValid)
 		error("listDir() called on invalid node");
 
@@ -207,18 +207,15 @@
 	if (!_isDirectory)
 		error("parent() called on file node");
 
-	if (_lock == NULL)
+	if (_lock == NULL) {
 		/* Parent of the root is the root itself */
-		node = clone();
-	else
-	{
+		node = 0;
+	} else {
 		BPTR parent_lock = ParentDir(_lock);
-		if (parent_lock)
-		{
+		if (parent_lock) {
 			node = new ABoxFilesystemNode(parent_lock);
 			UnLock(parent_lock);
-		}
-		else
+		} else
 			node = new ABoxFilesystemNode();
 	}
 





More information about the Scummvm-git-logs mailing list