浏览代码

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.
Konstantin 2 年之前
父节点
当前提交
f93c9277c6
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      lib/filesystem/CFilesystemLoader.cpp
  2. 1 1
      lib/filesystem/FileStream.cpp
  3. 1 1
      lib/filesystem/FileStream.h

+ 1 - 1
lib/filesystem/CFilesystemLoader.cpp

@@ -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;

+ 1 - 1
lib/filesystem/FileStream.cpp

@@ -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);

+ 1 - 1
lib/filesystem/FileStream.h

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