mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
Fix many warnings about implicit integer conversions when compiling for 64 bits.
--HG-- branch : minor
This commit is contained in:
@@ -49,7 +49,7 @@ void *CompressedData::getData() const
|
||||
|
||||
int CompressedData::getMipmapCount() const
|
||||
{
|
||||
return dataImages.size();
|
||||
return (int) dataImages.size();
|
||||
}
|
||||
|
||||
size_t CompressedData::getSize(int miplevel) const
|
||||
|
||||
@@ -129,8 +129,8 @@ ImageIOHandler::DecodedImage ImageIOHandler::decode(love::filesystem::FileData *
|
||||
if (!image)
|
||||
throw love::Exception("Could not decode image!");
|
||||
|
||||
img.width = CGImageGetWidth(image);
|
||||
img.height = CGImageGetHeight(image);
|
||||
img.width = (int) CGImageGetWidth(image);
|
||||
img.height = (int) CGImageGetHeight(image);
|
||||
|
||||
CGImageAlphaInfo alphainfo = CGImageGetAlphaInfo(image);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ CompressedData *luax_checkcompresseddata(lua_State *L, int idx)
|
||||
int w_CompressedData_getWidth(lua_State *L)
|
||||
{
|
||||
CompressedData *t = luax_checkcompresseddata(L, 1);
|
||||
int miplevel = luaL_optinteger(L, 2, 1);
|
||||
int miplevel = luaL_optint(L, 2, 1);
|
||||
int width = 0;
|
||||
|
||||
luax_catchexcept(L, [&](){ width = t->getWidth(miplevel - 1); });
|
||||
@@ -46,7 +46,7 @@ int w_CompressedData_getWidth(lua_State *L)
|
||||
int w_CompressedData_getHeight(lua_State *L)
|
||||
{
|
||||
CompressedData *t = luax_checkcompresseddata(L, 1);
|
||||
int miplevel = luaL_optinteger(L, 2, 1);
|
||||
int miplevel = luaL_optint(L, 2, 1);
|
||||
int height = 0;
|
||||
|
||||
luax_catchexcept(L, [&](){ height = t->getHeight(miplevel - 1); });
|
||||
@@ -58,7 +58,7 @@ int w_CompressedData_getHeight(lua_State *L)
|
||||
int w_CompressedData_getDimensions(lua_State *L)
|
||||
{
|
||||
CompressedData *t = luax_checkcompresseddata(L, 1);
|
||||
int miplevel = luaL_optinteger(L, 2, 1);
|
||||
int miplevel = luaL_optint(L, 2, 1);
|
||||
int width = 0, height = 0;
|
||||
|
||||
luax_catchexcept(L, [&]()
|
||||
|
||||
Reference in New Issue
Block a user