Get rid of some warnings

Originally committed to SVN as r1517.
This commit is contained in:
Niels Martin Hansen 2007-08-19 12:52:34 +00:00
parent 945c1b2bcd
commit 2807affc52

View file

@ -105,7 +105,7 @@ static int LuaTextExtents(lua_State *L)
fontname = lua_tostring(L, -1); fontname = lua_tostring(L, -1);
lua_pushstring(L, "fontsize"); lua_gettable(L, 1); lua_pushstring(L, "fontsize"); lua_gettable(L, 1);
fontsize = lua_tonumber(L, -1); fontsize = (int)lua_tonumber(L, -1);
lua_pushstring(L, "bold"); lua_gettable(L, 1); lua_pushstring(L, "bold"); lua_gettable(L, 1);
bold = lua_toboolean(L, -1); bold = lua_toboolean(L, -1);
@ -114,16 +114,16 @@ static int LuaTextExtents(lua_State *L)
italic = lua_toboolean(L, -1); italic = lua_toboolean(L, -1);
lua_pushstring(L, "scale_x"); lua_gettable(L, 1); lua_pushstring(L, "scale_x"); lua_gettable(L, 1);
scale_x = lua_tonumber(L, -1); scale_x = (float)lua_tonumber(L, -1);
lua_pushstring(L, "scale_y"); lua_gettable(L, 1); lua_pushstring(L, "scale_y"); lua_gettable(L, 1);
scale_y = lua_tonumber(L, -1); scale_y = (float)lua_tonumber(L, -1);
lua_pushstring(L, "spacing"); lua_gettable(L, 1); lua_pushstring(L, "spacing"); lua_gettable(L, 1);
spacing = lua_tonumber(L, -1); spacing = (int)lua_tonumber(L, -1);
lua_pushstring(L, "encoding"); lua_gettable(L, 1); lua_pushstring(L, "encoding"); lua_gettable(L, 1);
encoding = lua_tonumber(L, -1); encoding = (int)lua_tonumber(L, -1);
// get measurements // get measurements
script->cb.text_extents(script->cb.rundata, text, fontname, fontsize, bold, italic, script->cb.text_extents(script->cb.rundata, text, fontname, fontsize, bold, italic,