WIN32: Fix Variable Shadowing Compiler Warnings.
These are emitted when using the MinGW compiler.
This commit is contained in:
parent
16439b346f
commit
4dc175a4c2
2 changed files with 6 additions and 6 deletions
|
@ -244,10 +244,10 @@ Common::WriteStream *WindowsFilesystemNode::createWriteStream() {
|
||||||
return StdioStream::makeFromPath(getPath(), true);
|
return StdioStream::makeFromPath(getPath(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowsFilesystemNode::create(bool isDirectory) {
|
bool WindowsFilesystemNode::create(bool isDirectoryFlag) {
|
||||||
bool success;
|
bool success;
|
||||||
|
|
||||||
if (isDirectory) {
|
if (isDirectoryFlag) {
|
||||||
success = CreateDirectory(toUnicode(_path.c_str()), NULL) != 0;
|
success = CreateDirectory(toUnicode(_path.c_str()), NULL) != 0;
|
||||||
} else {
|
} else {
|
||||||
success = CreateFile(toUnicode(_path.c_str()), GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL) != INVALID_HANDLE_VALUE;
|
success = CreateFile(toUnicode(_path.c_str()), GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL) != INVALID_HANDLE_VALUE;
|
||||||
|
@ -264,12 +264,12 @@ bool WindowsFilesystemNode::create(bool isDirectory) {
|
||||||
_path += '\\';
|
_path += '\\';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_isDirectory != isDirectory) warning("failed to create %s: got %s", isDirectory ? "directory" : "file", _isDirectory ? "directory" : "file");
|
if (_isDirectory != isDirectoryFlag) warning("failed to create %s: got %s", isDirectoryFlag ? "directory" : "file", _isDirectory ? "directory" : "file");
|
||||||
return _isDirectory == isDirectory;
|
return _isDirectory == isDirectoryFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
warning("WindowsFilesystemNode: Create%s() was a success, but GetFileAttributes() indicates there is no such %s",
|
warning("WindowsFilesystemNode: Create%s() was a success, but GetFileAttributes() indicates there is no such %s",
|
||||||
isDirectory ? "Directory" : "File", isDirectory ? "directory" : "file");
|
isDirectoryFlag ? "Directory" : "File", isDirectoryFlag ? "directory" : "file");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
|
|
||||||
virtual Common::SeekableReadStream *createReadStream();
|
virtual Common::SeekableReadStream *createReadStream();
|
||||||
virtual Common::WriteStream *createWriteStream();
|
virtual Common::WriteStream *createWriteStream();
|
||||||
virtual bool create(bool isDirectory);
|
virtual bool create(bool isDirectoryFlag);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue