[Scummvm-cvs-logs] SF.net SVN: scummvm:[33587] scummvm/trunk/backends/fs

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Aug 3 20:29:38 CEST 2008


Revision: 33587
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33587&view=rev
Author:   fingolfin
Date:     2008-08-03 18:29:37 +0000 (Sun, 03 Aug 2008)

Log Message:
-----------
cleanup

Modified Paths:
--------------
    scummvm/trunk/backends/fs/abstract-fs.h
    scummvm/trunk/backends/fs/posix/posix-fs.cpp

Modified: scummvm/trunk/backends/fs/abstract-fs.h
===================================================================
--- scummvm/trunk/backends/fs/abstract-fs.h	2008-08-03 18:11:27 UTC (rev 33586)
+++ scummvm/trunk/backends/fs/abstract-fs.h	2008-08-03 18:29:37 UTC (rev 33587)
@@ -64,7 +64,7 @@
 	 *
 	 * @param name String containing the name of the child to create a new node.
 	 */
-	virtual AbstractFilesystemNode *getChild(const String &name) const = 0;
+	virtual AbstractFilesystemNode *getChild(const Common::String &name) const = 0;
 
 	/**
 	 * The parent node of this directory.
@@ -100,7 +100,7 @@
 	 *
 	 * @note By default, this method returns the value of getName().
 	 */
-	virtual String getDisplayName() const { return getName(); }
+	virtual Common::String getDisplayName() const { return getName(); }
 
 	/**
 	 * Returns the last component of the path pointed by this FilesystemNode.
@@ -111,12 +111,12 @@
 	 *
 	 * @note This method is very architecture dependent, please check the concrete implementation for more information.
 	 */
-	virtual String getName() const = 0;
+	virtual Common::String getName() const = 0;
 
 	/**
 	 * Returns the 'path' of the current node, usable in fopen().
 	 */
-	virtual String getPath() const = 0;
+	virtual Common::String getPath() const = 0;
 
 	/**
 	 * Indicates whether this path refers to a directory or not.

Modified: scummvm/trunk/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/posix/posix-fs.cpp	2008-08-03 18:11:27 UTC (rev 33586)
+++ scummvm/trunk/backends/fs/posix/posix-fs.cpp	2008-08-03 18:29:37 UTC (rev 33587)
@@ -42,8 +42,8 @@
  */
 class POSIXFilesystemNode : public AbstractFilesystemNode {
 protected:
-	String _displayName;
-	String _path;
+	Common::String _displayName;
+	Common::String _path;
 	bool _isDirectory;
 	bool _isValid;
 
@@ -59,17 +59,17 @@
 	 * @param path String with the path the new node should point to.
 	 * @param verify true if the isValid and isDirectory flags should be verified during the construction.
 	 */
-	POSIXFilesystemNode(const String &path, bool verify);
+	POSIXFilesystemNode(const Common::String &path, bool verify);
 
 	virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
-	virtual String getDisplayName() const { return _displayName; }
-	virtual String getName() const { return _displayName; }
-	virtual String getPath() const { return _path; }
+	virtual Common::String getDisplayName() const { return _displayName; }
+	virtual Common::String getName() const { return _displayName; }
+	virtual Common::String getPath() const { return _path; }
 	virtual bool isDirectory() const { return _isDirectory; }
 	virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; }
 	virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
 
-	virtual AbstractFilesystemNode *getChild(const String &n) const;
+	virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
 	virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
 	virtual AbstractFilesystemNode *getParent() const;
 
@@ -119,7 +119,7 @@
 	_isDirectory = true;
 }
 
-POSIXFilesystemNode::POSIXFilesystemNode(const String &p, bool verify) {
+POSIXFilesystemNode::POSIXFilesystemNode(const Common::String &p, bool verify) {
 	assert(p.size() > 0);
 
 	// Expand "~/" to the value of the HOME env variable
@@ -142,12 +142,12 @@
 	}
 }
 
-AbstractFilesystemNode *POSIXFilesystemNode::getChild(const String &n) const {
+AbstractFilesystemNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
 	// FIXME: Pretty lame implementation! We do no error checking to speak
 	// of, do not check if this is a special node, etc.
 	assert(_isDirectory);
 
-	String newPath(_path);
+	Common::String newPath(_path);
 	if (_path.lastChar() != '/')
 		newPath += '/';
 	newPath += n;
@@ -175,7 +175,7 @@
 			continue;
 		}
 
-		String newPath(_path);
+		Common::String newPath(_path);
 		if (newPath.lastChar() != '/')
 			newPath += '/';
 		newPath += dp->d_name;
@@ -236,7 +236,7 @@
 	const char *start = _path.c_str();
 	const char *end = lastPathComponent(_path);
 
-	return new POSIXFilesystemNode(String(start, end - start), true);
+	return new POSIXFilesystemNode(Common::String(start, end - start), true);
 }
 
 #endif //#if defined(UNIX)


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