Permalink
Browse files

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.
  • Loading branch information...
1 parent 6c4b89e commit adbf18abca0d6a43830645ab0d8ce492bbbd4971 @digitall digitall committed Jan 12, 2017
@@ -195,11 +195,11 @@ class AbstractFSNode {
/**
* Creates a file referred by this node.
*
- * @param isDirectory true if created file must be a directory
+ * @param isDirectoryFlag true if created file must be a directory
*
* @return true if file is created successfully
*/
- virtual bool create(bool isDirectory) = 0;
+ virtual bool create(bool isDirectoryFlag) = 0;
};
@@ -443,7 +443,7 @@ Common::WriteStream *AmigaOSFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool AmigaOSFilesystemNode::create(bool isDirectory) {
+bool AmigaOSFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -116,7 +116,7 @@ class AmigaOSFilesystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
@@ -108,7 +108,7 @@ Common::WriteStream *ChRootFilesystemNode::createWriteStream() {
return _realNode->createWriteStream();
}
-bool ChRootFilesystemNode::create(bool /*isDir*/) {
+bool ChRootFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -49,7 +49,7 @@ class ChRootFilesystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
private:
static Common::String addPathComponent(const Common::String &path, const Common::String &component);
@@ -211,7 +211,7 @@ Common::WriteStream *DSFileSystemNode::createWriteStream() {
return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
-bool DSFileSystemNode::create(bool isDirectory) {
+bool DSFileSystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -271,7 +271,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path) {
_path = path;
}
-GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDir) {
+GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDirectoryFlag) {
//consolePrintf("'%s'",path.c_str());
int lastSlash = 3;
@@ -284,7 +284,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDir)
_displayName = Common::String(path.c_str() + lastSlash + 1);
_path = path;
_isValid = true;
- _isDirectory = isDir;
+ _isDirectory = isDirectoryFlag;
}
@@ -398,7 +398,7 @@ Common::WriteStream *GBAMPFileSystemNode::createWriteStream() {
return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
-bool GBAMPFileSystemNode::create(bool isDirectory) {
+bool GBAMPFileSystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -91,7 +91,7 @@ class DSFileSystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
/**
* Returns the zip file this node points to.
@@ -132,7 +132,7 @@ class GBAMPFileSystemNode : public AbstractFSNode {
* @param path String with the path the new node should point to.
* @param path true if path is a directory, false otherwise.
*/
- GBAMPFileSystemNode(const Common::String &path, bool isDirectory);
+ GBAMPFileSystemNode(const Common::String &path, bool isDirectoryFlag);
/**
* Copy constructor.
@@ -157,7 +157,7 @@ class GBAMPFileSystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
struct fileHandle {
@@ -160,7 +160,7 @@ Common::WriteStream *N64FilesystemNode::createWriteStream() {
return RomfsStream::makeFromPath(getPath(), true);
}
-bool N64FilesystemNode::create(bool isDirectory) {
+bool N64FilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -73,7 +73,7 @@ class N64FilesystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif
@@ -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;
}
@@ -73,7 +73,7 @@ class POSIXFilesystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
private:
/**
@@ -441,7 +441,7 @@ Common::WriteStream *Ps2FilesystemNode::createWriteStream() {
return PS2FileStream::makeFromPath(getPath(), true);
}
-bool Ps2FilesystemNode::create(bool isDirectory) {
+bool Ps2FilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -96,7 +96,7 @@ friend class Ps2FilesystemFactory;
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
int getDev() { return 0; }
};
@@ -239,7 +239,7 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() {
return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
-bool PSPFilesystemNode::create(bool isDirectory) {
+bool PSPFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -65,7 +65,7 @@ class PSPFilesystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif
@@ -232,7 +232,7 @@ Common::WriteStream *SymbianFilesystemNode::createWriteStream() {
return SymbianStdioStream::makeFromPath(getPath(), true);
}
-bool SymbianFilesystemNode::create(bool isDirectory) {
+bool SymbianFilesystemNode::create(bool isDirectoryFlag) {
error("Not supported");
return false;
}
@@ -66,7 +66,7 @@ class SymbianFilesystemNode : public AbstractFSNode {
virtual Common::SeekableReadStream *createReadStream();
virtual Common::WriteStream *createWriteStream();
- virtual bool create(bool isDirectory);
+ virtual bool create(bool isDirectoryFlag);
};
#endif

0 comments on commit adbf18a

Please sign in to comment.