Cleanup (#826)
* Update meson.build - add logic to loop over more lua names (in the future more names might be discovered) - disable warnings and errors on dependencies * adding missing includes and checks, correct data types, pointer mess […] - various functions from string.h were used but never defined - logic was done across multiple different data types with different signedness, got all of them up to snuff - give 0 sized array size of 1 (array of size 0 is illegal, but rewriting the code is out of the scope of this commit) - add preprocessor that marks possibly unused argument as such (does not mean they will get optimized out or anything) - correctly initialize structs with all data needed All these were found by generating the project using `meson -Dwarning_level=3 -Dwerror=true` * remove undefined behavior, correct data types * Comment manual bit manipulation to be investigated * check for more edge cases, replace multiple cleanups with goto * remove system specific includes
This commit is contained in:
+6
-5
@@ -1,3 +1,4 @@
|
||||
#include <string.h>
|
||||
#include "api.h"
|
||||
#include "../renderer.h"
|
||||
#include "../rencache.h"
|
||||
@@ -166,14 +167,14 @@ static int f_get_size(lua_State *L) {
|
||||
}
|
||||
|
||||
|
||||
static int f_begin_frame(lua_State *L) {
|
||||
rencache_begin_frame(L);
|
||||
static int f_begin_frame(UNUSED lua_State *L) {
|
||||
rencache_begin_frame();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int f_end_frame(lua_State *L) {
|
||||
rencache_end_frame(L);
|
||||
static int f_end_frame(UNUSED lua_State *L) {
|
||||
rencache_end_frame();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -214,7 +215,7 @@ static int f_draw_text(lua_State *L) {
|
||||
float x = luaL_checknumber(L, 3);
|
||||
int y = luaL_checknumber(L, 4);
|
||||
RenColor color = checkcolor(L, 5, 255);
|
||||
x = rencache_draw_text(L, fonts, text, x, y, color);
|
||||
x = rencache_draw_text(fonts, text, x, y, color);
|
||||
lua_pushnumber(L, x);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user