summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-14 01:28:09 +0200
committerMattes D <github@xoft.cz>2014-09-14 01:33:05 +0200
commitc4a53c5d7dadc8303eeac2d92a7513c63c2f776e (patch)
tree66d747f4a50fac39e151a5cf3cd0ad0a16a9d138
parentImproved cBlockHandler::DropBlock (diff)
downloadcuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.tar
cuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.tar.gz
cuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.tar.bz2
cuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.tar.lz
cuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.tar.xz
cuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.tar.zst
cuberite-c4a53c5d7dadc8303eeac2d92a7513c63c2f776e.zip
Diffstat (limited to '')
-rw-r--r--src/OSSupport/File.cpp14
-rw-r--r--src/OSSupport/IsThread.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp
index 2194c46ee..cb6031da6 100644
--- a/src/OSSupport/File.cpp
+++ b/src/OSSupport/File.cpp
@@ -298,7 +298,7 @@ bool cFile::Rename(const AString & a_OrigFileName, const AString & a_NewFileName
bool cFile::Copy(const AString & a_SrcFileName, const AString & a_DstFileName)
{
#ifdef _WIN32
- return (CopyFile(a_SrcFileName.c_str(), a_DstFileName.c_str(), true) != 0);
+ return (CopyFileA(a_SrcFileName.c_str(), a_DstFileName.c_str(), true) != 0);
#else
// Other OSs don't have a direct CopyFile equivalent, do it the harder way:
std::ifstream src(a_SrcFileName.c_str(), std::ios::binary);
@@ -322,7 +322,7 @@ bool cFile::Copy(const AString & a_SrcFileName, const AString & a_DstFileName)
bool cFile::IsFolder(const AString & a_Path)
{
#ifdef _WIN32
- DWORD FileAttrib = GetFileAttributes(a_Path.c_str());
+ DWORD FileAttrib = GetFileAttributesA(a_Path.c_str());
return ((FileAttrib != INVALID_FILE_ATTRIBUTES) && ((FileAttrib & FILE_ATTRIBUTE_DIRECTORY) != 0));
#else
struct stat st;
@@ -337,7 +337,7 @@ bool cFile::IsFolder(const AString & a_Path)
bool cFile::IsFile(const AString & a_Path)
{
#ifdef _WIN32
- DWORD FileAttrib = GetFileAttributes(a_Path.c_str());
+ DWORD FileAttrib = GetFileAttributesA(a_Path.c_str());
return ((FileAttrib != INVALID_FILE_ATTRIBUTES) && ((FileAttrib & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE)) == 0));
#else
struct stat st;
@@ -366,7 +366,7 @@ int cFile::GetSize(const AString & a_FileName)
bool cFile::CreateFolder(const AString & a_FolderPath)
{
#ifdef _WIN32
- return (CreateDirectory(a_FolderPath.c_str(), NULL) != 0);
+ return (CreateDirectoryA(a_FolderPath.c_str(), NULL) != 0);
#else
return (mkdir(a_FolderPath.c_str(), S_IRWXU | S_IRWXG | S_IRWXO) == 0);
#endif
@@ -396,13 +396,13 @@ AStringVector cFile::GetFolderContents(const AString & a_Folder)
// Find all files / folders:
FileFilter.append("*.*");
HANDLE hFind;
- WIN32_FIND_DATA FindFileData;
- if ((hFind = FindFirstFile(FileFilter.c_str(), &FindFileData)) != INVALID_HANDLE_VALUE)
+ WIN32_FIND_DATAA FindFileData;
+ if ((hFind = FindFirstFileA(FileFilter.c_str(), &FindFileData)) != INVALID_HANDLE_VALUE)
{
do
{
AllFiles.push_back(FindFileData.cFileName);
- } while (FindNextFile(hFind, &FindFileData));
+ } while (FindNextFileA(hFind, &FindFileData));
FindClose(hFind);
}
diff --git a/src/OSSupport/IsThread.h b/src/OSSupport/IsThread.h
index c20fc3e7e..5de5f31c4 100644
--- a/src/OSSupport/IsThread.h
+++ b/src/OSSupport/IsThread.h
@@ -69,7 +69,7 @@ protected:
static DWORD __stdcall thrExecute(LPVOID a_Param)
{
// Create a window so that the thread can be identified by 3rd party tools:
- HWND IdentificationWnd = CreateWindow("STATIC", ((cIsThread *)a_Param)->m_ThreadName.c_str(), 0, 0, 0, 0, WS_OVERLAPPED, NULL, NULL, NULL, NULL);
+ HWND IdentificationWnd = CreateWindowA("STATIC", ((cIsThread *)a_Param)->m_ThreadName.c_str(), 0, 0, 0, 0, WS_OVERLAPPED, NULL, NULL, NULL, NULL);
// Run the thread:
((cIsThread *)a_Param)->Execute();