diff options
author | D G Turner | 2017-01-12 08:22:40 +0000 |
---|---|---|
committer | D G Turner | 2017-01-12 08:22:40 +0000 |
commit | adbf18abca0d6a43830645ab0d8ce492bbbd4971 (patch) | |
tree | 60f64382d27a1fcede127c89c2fdd868007c3d58 /backends/fs/posix | |
parent | 6c4b89e6dc439299af68afaa75b366e4aece45c9 (diff) | |
download | scummvm-rg350-adbf18abca0d6a43830645ab0d8ce492bbbd4971.tar.gz scummvm-rg350-adbf18abca0d6a43830645ab0d8ce492bbbd4971.tar.bz2 scummvm-rg350-adbf18abca0d6a43830645ab0d8ce492bbbd4971.zip |
BACKENDS: Fix Shadowing Compiler Warning for isDirectory symbol.
This should ensure that any future cut-and-paste for new backends do not
repeat this same warning issue.
Diffstat (limited to 'backends/fs/posix')
-rw-r--r-- | backends/fs/posix/posix-fs.cpp | 10 | ||||
-rw-r--r-- | backends/fs/posix/posix-fs.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index ce5715210a..4434bcba97 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -253,10 +253,10 @@ Common::WriteStream *POSIXFilesystemNode::createWriteStream() { return StdioStream::makeFromPath(getPath(), true); } -bool POSIXFilesystemNode::create(bool isDir) { +bool POSIXFilesystemNode::create(bool isDirectoryFlag) { bool success; - if (isDir) { + if (isDirectoryFlag) { success = mkdir(_path.c_str(), 0755) == 0; } else { int fd = open(_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0755); @@ -270,12 +270,12 @@ bool POSIXFilesystemNode::create(bool isDir) { if (success) { setFlags(); if (_isValid) { - if (_isDirectory != isDir) warning("failed to create %s: got %s", isDir ? "directory" : "file", _isDirectory ? "directory" : "file"); - return _isDirectory == isDir; + if (_isDirectory != isDirectoryFlag) warning("failed to create %s: got %s", isDirectoryFlag ? "directory" : "file", _isDirectory ? "directory" : "file"); + return _isDirectory == isDirectoryFlag; } warning("POSIXFilesystemNode: %s() was a success, but stat indicates there is no such %s", - isDir ? "mkdir" : "creat", isDir ? "directory" : "file"); + isDirectoryFlag ? "mkdir" : "creat", isDirectoryFlag ? "directory" : "file"); return false; } diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h index 4ebce7e9d9..5a6b6bd2bd 100644 --- a/backends/fs/posix/posix-fs.h +++ b/backends/fs/posix/posix-fs.h @@ -73,7 +73,7 @@ public: virtual Common::SeekableReadStream *createReadStream(); virtual Common::WriteStream *createWriteStream(); - virtual bool create(bool isDirectory); + virtual bool create(bool isDirectoryFlag); private: /** |