aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/palmos
diff options
context:
space:
mode:
authorMax Horn2006-04-04 20:54:55 +0000
committerMax Horn2006-04-04 20:54:55 +0000
commit112ba72222bf191a9c1e4d1ef8e83af1d43d3082 (patch)
treedd8d76377e0c1b3cd72e6083f50ac0fe0a1e60dc /backends/fs/palmos
parentbca4dd001fae016b5c137d00d7c13d58c9f7937f (diff)
downloadscummvm-rg350-112ba72222bf191a9c1e4d1ef8e83af1d43d3082.tar.gz
scummvm-rg350-112ba72222bf191a9c1e4d1ef8e83af1d43d3082.tar.bz2
scummvm-rg350-112ba72222bf191a9c1e4d1ef8e83af1d43d3082.zip
Removing more pseudo copy constructors in favor of the standard copy constructor (gee, everybody is copying my bad code, it seems ;-)
svn-id: r21597
Diffstat (limited to 'backends/fs/palmos')
-rw-r--r--backends/fs/palmos/palmos-fs.cpp33
1 files changed, 12 insertions, 21 deletions
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index 3db14979f4..301226685d 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -41,7 +41,6 @@ protected:
public:
PalmOSFilesystemNode();
PalmOSFilesystemNode(const Char *path);
- PalmOSFilesystemNode(const PalmOSFilesystemNode *node);
virtual String displayName() const { return _displayName; }
virtual bool isValid() const { return _isValid; }
@@ -55,6 +54,17 @@ private:
static void addFile (FSList &list, ListMode mode, const Char *base, FileInfoType* find_data);
};
+static const char *lastPathComponent(const Common::String &str) {
+ const char *start = str.c_str();
+ const char *cur = start + str.size() - 2;
+
+ while (cur > start && *cur != '/') {
+ --cur;
+ }
+
+ return cur+1;
+}
+
void PalmOSFilesystemNode::addFile(FSList &list, ListMode mode, const char *base, FileInfoType* find_data) {
PalmOSFilesystemNode entry;
bool isDirectory;
@@ -74,7 +84,7 @@ void PalmOSFilesystemNode::addFile(FSList &list, ListMode mode, const char *base
entry._isValid = true;
entry._isPseudoRoot = false;
- list.push_back(wrap(new PalmOSFilesystemNode(&entry)));
+ list.push_back(wrap(new PalmOSFilesystemNode(entry)));
}
AbstractFilesystemNode *FilesystemNode::getRoot() {
@@ -89,14 +99,6 @@ PalmOSFilesystemNode::PalmOSFilesystemNode() {
_isPseudoRoot = true;
}
-PalmOSFilesystemNode::PalmOSFilesystemNode(const PalmOSFilesystemNode *node) {
- _displayName = node->_displayName;
- _isDirectory = node->_isDirectory;
- _isValid = node->_isValid;
- _isPseudoRoot = node->_isPseudoRoot;
- _path = node->_path;
-}
-
FSList PalmOSFilesystemNode::listDir(ListMode mode) const {
FSList myList;
@@ -125,17 +127,6 @@ FSList PalmOSFilesystemNode::listDir(ListMode mode) const {
return myList;
}
-const char *lastPathComponent(const Common::String &str) {
- const char *start = str.c_str();
- const char *cur = start + str.size() - 2;
-
- while (cur > start && *cur != '/') {
- --cur;
- }
-
- return cur+1;
-}
-
AbstractFilesystemNode *PalmOSFilesystemNode::parent() const {
PalmOSFilesystemNode *p = 0;