1
0
Fork 0
forked from len0rd/rockbox

lua optimize current_path function

frees up around 500 bytes by using the builtin string functionality

Change-Id: Icd4ec921d3fec339b8a4b7f80c9c63d51d4c101c
This commit is contained in:
William Wilgus 2018-10-13 13:35:01 -04:00
parent 0b7a8d5afd
commit 07fed9053a
4 changed files with 13 additions and 24 deletions

View file

@ -194,13 +194,7 @@ RB_WRAP(font_getstringsize)
RB_WRAP(current_path)
{
const char *current_path = get_current_path(L, 1);
if(current_path != NULL)
lua_pushstring(L, current_path);
else
lua_pushnil(L);
return 1;
return get_current_path(L, 1);
}
static void fill_text_message(lua_State *L, struct text_message * message,