mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
lib/filesystem: rename CreateFile to createFile
In MinGW, there is a define which replaces all CreateFile to CreateFileA or CreateFileW and breaks compilation. Fix it.
This commit is contained in:
@@ -88,7 +88,7 @@ bool CFilesystemLoader::createResource(std::string filename, bool update)
|
|||||||
|
|
||||||
if (!update)
|
if (!update)
|
||||||
{
|
{
|
||||||
if (!FileStream::CreateFile(baseDirectory / filename))
|
if (!FileStream::createFile(baseDirectory / filename))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
fileList[resID] = filename;
|
fileList[resID] = filename;
|
||||||
|
@@ -236,7 +236,7 @@ zlib_filefunc64_def* FileStream::GetMinizipFilefunc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*static*/
|
/*static*/
|
||||||
bool FileStream::CreateFile(const boost::filesystem::path& filename)
|
bool FileStream::createFile(const boost::filesystem::path& filename)
|
||||||
{
|
{
|
||||||
FILE* f = do_open(filename.c_str(), CHAR_LITERAL("wb"));
|
FILE* f = do_open(filename.c_str(), CHAR_LITERAL("wb"));
|
||||||
bool result = (f != nullptr);
|
bool result = (f != nullptr);
|
||||||
|
@@ -59,7 +59,7 @@ public:
|
|||||||
explicit FileStream(const boost::filesystem::path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
|
explicit FileStream(const boost::filesystem::path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
|
||||||
: boost::iostreams::stream<FileBuf>(p, mode) {}
|
: boost::iostreams::stream<FileBuf>(p, mode) {}
|
||||||
|
|
||||||
static bool CreateFile(const boost::filesystem::path& filename);
|
static bool createFile(const boost::filesystem::path& filename);
|
||||||
|
|
||||||
static zlib_filefunc64_def* GetMinizipFilefunc();
|
static zlib_filefunc64_def* GetMinizipFilefunc();
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user