[Scummvm-cvs-logs] SF.net SVN: scummvm: [22317] scummvm/trunk/base

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed May 3 13:50:14 CEST 2006


Revision: 22317
Author:   fingolfin
Date:     2006-05-03 13:49:33 -0700 (Wed, 03 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22317&view=rev

Log Message:
-----------
Removed FilesystemNode::isValid (leaving it up to the porters to decide whether to remove their isValid code or not)

Modified Paths:
--------------
    scummvm/trunk/backends/fs/abstract-fs.h
    scummvm/trunk/backends/fs/fs.cpp
    scummvm/trunk/backends/fs/fs.h
    scummvm/trunk/base/main.cpp
    scummvm/trunk/common/file.cpp
Modified: scummvm/trunk/backends/fs/abstract-fs.h
===================================================================
--- scummvm/trunk/backends/fs/abstract-fs.h	2006-05-03 20:45:57 UTC (rev 22316)
+++ scummvm/trunk/backends/fs/abstract-fs.h	2006-05-03 20:49:33 UTC (rev 22317)
@@ -85,7 +85,6 @@
 	virtual ~AbstractFilesystemNode() {}
 
 	virtual String displayName() const = 0;
-	virtual bool isValid() const = 0;
 	virtual bool isDirectory() const = 0;
 	virtual String path() const = 0;
 	virtual bool listDir(AbstractFSList &list, ListMode mode) const = 0;

Modified: scummvm/trunk/backends/fs/fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/fs.cpp	2006-05-03 20:45:57 UTC (rev 22316)
+++ scummvm/trunk/backends/fs/fs.cpp	2006-05-03 20:49:33 UTC (rev 22317)
@@ -121,12 +121,6 @@
 	return _realNode->displayName();
 }
 
-bool FilesystemNode::isValid() const {
-	if (_realNode == 0)
-		return false;
-	return _realNode->isValid();
-}
-
 bool FilesystemNode::isDirectory() const {
 	if (_realNode == 0)
 		return false;

Modified: scummvm/trunk/backends/fs/fs.h
===================================================================
--- scummvm/trunk/backends/fs/fs.h	2006-05-03 20:45:57 UTC (rev 22316)
+++ scummvm/trunk/backends/fs/fs.h	2006-05-03 20:49:33 UTC (rev 22317)
@@ -122,16 +122,6 @@
 	virtual String displayName() const;
 
 	/**
-	 * Is this node valid? Returns true if the file/directory pointed
-	 * to by this node exists, false otherwise.
-	 *
-	 * @todo Maybe rename this to exists() ? Or maybe even distinguish between
-	 * the two? E.g. a path may be non-existant but valid, while another might
-	 * be completely invalid). But do we ever need to make that distinction?
-	 */
-	virtual bool isValid() const;
-
-	/**
 	 * Is this node pointing to a directory?
 	 * @todo Currently we assume that a valid node that is not a directory
 	 * automatically is a file (ignoring things like symlinks). That might

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-05-03 20:45:57 UTC (rev 22316)
+++ scummvm/trunk/base/main.cpp	2006-05-03 20:49:33 UTC (rev 22317)
@@ -170,7 +170,7 @@
 	if (ConfMan.hasKey("path")) {
 		Common::String path(ConfMan.get("path"));
 		FilesystemNode dir(path);
-		if (!dir.isValid() || !dir.isDirectory()) {
+		if (!dir.isDirectory()) {
 			warning("Game directory does not exist (%s)", path.c_str());
 			return 0;
 		}

Modified: scummvm/trunk/common/file.cpp
===================================================================
--- scummvm/trunk/common/file.cpp	2006-05-03 20:45:57 UTC (rev 22316)
+++ scummvm/trunk/common/file.cpp	2006-05-03 20:49:33 UTC (rev 22317)
@@ -309,7 +309,7 @@
 	// First try to find the file it via a FilesystemNode (in case an absolute
 	// path was passed). But we only use this to filter out directories.
 	FilesystemNode file(filename);
-	if (file.isValid() && file.isDirectory())
+	if (file.isDirectory())
 		return false;
 
 	// Next, try to locate the file by *opening* it in read mode. This has


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list