aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/wii/wii-fs.cpp
diff options
context:
space:
mode:
authorAndre Heider2009-01-17 18:48:35 +0000
committerAndre Heider2009-01-17 18:48:35 +0000
commit2e321f7a74c312e9aeabe7e77d525d9d2d020380 (patch)
tree9cdbae7948b5d790a0b4eedcbbf7aae0a132e52d /backends/fs/wii/wii-fs.cpp
parent20dad9e967ce0ae566e93fa2c4ef2c737ecfb408 (diff)
downloadscummvm-rg350-2e321f7a74c312e9aeabe7e77d525d9d2d020380.tar.gz
scummvm-rg350-2e321f7a74c312e9aeabe7e77d525d9d2d020380.tar.bz2
scummvm-rg350-2e321f7a74c312e9aeabe7e77d525d9d2d020380.zip
use pointers when passing struct stat
svn-id: r35882
Diffstat (limited to 'backends/fs/wii/wii-fs.cpp')
-rw-r--r--backends/fs/wii/wii-fs.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index 4064e271db..d579d9f2a3 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -46,7 +46,7 @@ protected:
virtual void initRootNode();
virtual bool getDevopChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual void setFlags(const struct stat st);
+ virtual void setFlags(const struct stat *st);
virtual void clearFlags();
public:
@@ -61,7 +61,7 @@ public:
* @param path Common::String with the path the new node should point to.
*/
WiiFilesystemNode(const Common::String &path);
- WiiFilesystemNode(const Common::String &p, const struct stat st);
+ WiiFilesystemNode(const Common::String &p, const struct stat *st);
virtual bool exists() const;
virtual Common::String getDisplayName() const { return _displayName; }
@@ -117,11 +117,11 @@ void WiiFilesystemNode::clearFlags() {
_isWritable = false;
}
-void WiiFilesystemNode::setFlags(const struct stat st) {
+void WiiFilesystemNode::setFlags(const struct stat *st) {
_exists = true;
- _isDirectory = S_ISDIR(st.st_mode);
- _isReadable = (st.st_mode & S_IRUSR) > 0;
- _isWritable = (st.st_mode & S_IWUSR) > 0;
+ _isDirectory = S_ISDIR(st->st_mode);
+ _isReadable = (st->st_mode & S_IRUSR) > 0;
+ _isWritable = (st->st_mode & S_IWUSR) > 0;
}
WiiFilesystemNode::WiiFilesystemNode() {
@@ -143,12 +143,12 @@ WiiFilesystemNode::WiiFilesystemNode(const Common::String &p) {
struct stat st;
if (!stat(_path.c_str(), &st))
- setFlags(st);
+ setFlags(&st);
else
clearFlags();
}
-WiiFilesystemNode::WiiFilesystemNode(const Common::String &p, const struct stat st) {
+WiiFilesystemNode::WiiFilesystemNode(const Common::String &p, const struct stat *st) {
if (p.empty()) {
initRootNode();
return;
@@ -213,7 +213,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
if (isDir)
newPath += '/';
- list.push_back(new WiiFilesystemNode(newPath, st));
+ list.push_back(new WiiFilesystemNode(newPath, &st));
}
dirclose(dp);