Fixed some warnings on VisualStudio2010

This commit is contained in:
Mathieu Labbé
2015-04-01 10:38:59 -04:00
parent 6089a44589
commit 37c34e8186
10 changed files with 27 additions and 23 deletions
+6 -6
View File
@@ -36,12 +36,12 @@ bool UFile::exists(const std::string &filePath)
long UFile::length(const std::string &filePath)
{
long fileSize = 0;
FILE* fp = 0;
long fileSize = 0;
FILE* fp = 0;
#ifdef _MSC_VER
fopen_s(&fp, filePath.c_str(), "rb");
#else
fp = fopen(filePath.c_str(), "rb");
fopen_s(&fp, filePath.c_str(), "rb");
#else
fp = fopen(filePath.c_str(), "rb");
#endif
if(fp == NULL)
{
@@ -70,7 +70,7 @@ std::string UFile::getName(const std::string & filePath)
{
std::string fullPath = filePath;
std::string name;
for(int i=fullPath.size()-1; i>=0; --i)
for(int i=(int)fullPath.size()-1; i>=0; --i)
{
if(fullPath[i] == '/' || fullPath[i] == '\\')
{