mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Fix compiler warnings
This commit is contained in:
@@ -389,7 +389,7 @@ namespace openal
|
|||||||
|
|
||||||
for(unsigned int i = 0; i < MAX_BUFFERS; i++)
|
for(unsigned int i = 0; i < MAX_BUFFERS; i++)
|
||||||
{
|
{
|
||||||
int decoded = streamAtomic(buffers[i], decoder);
|
streamAtomic(buffers[i], decoder);
|
||||||
++usedBuffers;
|
++usedBuffers;
|
||||||
if(decoder->isFinished())
|
if(decoder->isFinished())
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ namespace physfs
|
|||||||
std::string tokenized_name(filename);
|
std::string tokenized_name(filename);
|
||||||
std::string tokenized_function(filename);
|
std::string tokenized_function(filename);
|
||||||
|
|
||||||
for (int i = 0; i < tokenized_name.size(); i++)
|
for (unsigned int i = 0; i < tokenized_name.size(); i++)
|
||||||
{
|
{
|
||||||
if (tokenized_name[i] == '.')
|
if (tokenized_name[i] == '.')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -104,11 +104,11 @@ namespace opengl
|
|||||||
glTexSubImage2D(GL_TEXTURE_2D, 0, texture_x, texture_y, w, h, (type == FONT_TRUETYPE ? GL_LUMINANCE_ALPHA : GL_RGBA), GL_UNSIGNED_BYTE, gd->getData());
|
glTexSubImage2D(GL_TEXTURE_2D, 0, texture_x, texture_y, w, h, (type == FONT_TRUETYPE ? GL_LUMINANCE_ALPHA : GL_RGBA), GL_UNSIGNED_BYTE, gd->getData());
|
||||||
|
|
||||||
Quad::Viewport v;
|
Quad::Viewport v;
|
||||||
v.x = texture_x;
|
v.x = (float) texture_x;
|
||||||
v.y = texture_y;
|
v.y = (float) texture_y;
|
||||||
v.w = w;
|
v.w = (float) w;
|
||||||
v.h = h;
|
v.h = (float) h;
|
||||||
Quad * q = new Quad(v, TEXTURE_WIDTH, TEXTURE_HEIGHT);
|
Quad * q = new Quad(v, (const float) TEXTURE_WIDTH, (const float) TEXTURE_HEIGHT);
|
||||||
const vertex * verts = q->getVertices();
|
const vertex * verts = q->getVertices();
|
||||||
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ namespace opengl
|
|||||||
{
|
{
|
||||||
Quad * quad = luax_checktype<Quad>(L, 1, "Quad", GRAPHICS_QUAD_T);
|
Quad * quad = luax_checktype<Quad>(L, 1, "Quad", GRAPHICS_QUAD_T);
|
||||||
Quad::Viewport v;
|
Quad::Viewport v;
|
||||||
v.x = luaL_checknumber(L, 2);
|
v.x = (float) luaL_checknumber(L, 2);
|
||||||
v.y = luaL_checknumber(L, 3);
|
v.y = (float) luaL_checknumber(L, 3);
|
||||||
v.w = luaL_checknumber(L, 4);
|
v.w = (float) luaL_checknumber(L, 4);
|
||||||
v.h = luaL_checknumber(L, 5);
|
v.h = (float) luaL_checknumber(L, 5);
|
||||||
quad->setViewport(v);
|
quad->setViewport(v);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user