1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +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:
Konstantin
2023-01-22 15:45:43 +03:00
parent 8064bc5465
commit f93c9277c6
3 changed files with 3 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ bool CFilesystemLoader::createResource(std::string filename, bool update)
if (!update)
{
if (!FileStream::CreateFile(baseDirectory / filename))
if (!FileStream::createFile(baseDirectory / filename))
return false;
}
fileList[resID] = filename;

View File

@@ -236,7 +236,7 @@ zlib_filefunc64_def* FileStream::GetMinizipFilefunc()
}
/*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"));
bool result = (f != nullptr);

View File

@@ -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)
: 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();
};