Avoid some VC++ compiler warnings

This commit is contained in:
Alex Szpakowski
2015-04-02 00:28:09 -03:00
parent 2a6bffaa5a
commit cf0968fc6d
13 changed files with 25 additions and 26 deletions
+3 -3
View File
@@ -312,7 +312,7 @@ bool Filesystem::mount(const char *archive, const char *mountpoint, bool appendT
if (realPath.length() == 0)
return false;
return PHYSFS_mount(realPath.c_str(), mountpoint, appendToPath);
return PHYSFS_mount(realPath.c_str(), mountpoint, appendToPath) != 0;
}
bool Filesystem::unmount(const char *archive)
@@ -353,7 +353,7 @@ bool Filesystem::unmount(const char *archive)
if (!mountPoint)
return false;
return PHYSFS_removeFromSearchPath(realPath.c_str());
return PHYSFS_removeFromSearchPath(realPath.c_str()) != 0;
}
love::filesystem::File *Filesystem::newFile(const char *filename) const
@@ -485,7 +485,7 @@ std::string Filesystem::getRealDirectory(const char *filename) const
bool Filesystem::isDirectory(const char *dir) const
{
return PHYSFS_isDirectory(dir);
return PHYSFS_isDirectory(dir) != 0;
}
bool Filesystem::isFile(const char *file) const
+1 -1
View File
@@ -110,7 +110,7 @@ int w_File_read(lua_State *L)
File *file = luax_checkfile(L, 1);
Data *d = 0;
int64 size = (int64)luaL_optnumber(L, 2, File::ALL);
int64 size = (int64) luaL_optnumber(L, 2, (lua_Number) File::ALL);
try
{