fixed compiler warnings for winrt code

This commit is contained in:
Dale Stammen 2014-10-27 10:57:57 -07:00
parent 77c00bc77f
commit 6fb69870f9
1 changed files with 7 additions and 5 deletions

View File

@ -543,7 +543,7 @@ static Data getData(const std::string& filename, bool forString)
Data ret; Data ret;
unsigned char* buffer = nullptr; unsigned char* buffer = nullptr;
ssize_t size = 0; size_t size = 0;
size_t readsize; size_t readsize;
const char* mode = nullptr; const char* mode = nullptr;
if (forString) if (forString)
@ -1062,7 +1062,7 @@ bool FileUtils::createDirectory(const std::string& path)
if (!(GetFileAttributesEx(wpath.c_str(), GetFileExInfoStandard, &wfad))) if (!(GetFileAttributesEx(wpath.c_str(), GetFileExInfoStandard, &wfad)))
{ {
subpath = ""; subpath = "";
for(int i = 0 ; i < dirs.size() ; ++i) for(unsigned int i = 0 ; i < dirs.size() ; ++i)
{ {
subpath += dirs[i]; subpath += dirs[i];
if (i > 0 && !isDirectoryExist(subpath)) if (i > 0 && !isDirectoryExist(subpath))
@ -1146,7 +1146,7 @@ bool FileUtils::removeDirectory(const std::string& path)
bool ret=true; bool ret=true;
if (search!=INVALID_HANDLE_VALUE) if (search!=INVALID_HANDLE_VALUE)
{ {
bool find=true; BOOL find=true;
while (find) while (find)
{ {
//. .. //. ..
@ -1168,8 +1168,10 @@ bool FileUtils::removeDirectory(const std::string& path)
} }
FindClose(search); FindClose(search);
} }
if (ret) if (ret && RemoveDirectory(wpath.c_str()))
return RemoveDirectory(wpath.c_str()); {
return true;
}
return false; return false;
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
std::string command = "cmd /c rd /s /q "; std::string command = "cmd /c rd /s /q ";