mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
lua optimize current_path function
frees up around 500 bytes by using the builtin string functionality Change-Id: Icd4ec921d3fec339b8a4b7f80c9c63d51d4c101c
This commit is contained in:
parent
0b7a8d5afd
commit
07fed9053a
4 changed files with 13 additions and 24 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue