diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-06-04 22:38:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 22:38:07 +0200 |
commit | 180e551c56ec7229a15bfd9ce7339bc9881e1df6 (patch) | |
tree | 6425b85a713a8805ce42d5987cb8609c5aeb3d5b /src/script/lua_api/l_server.cpp | |
parent | 86b19f284990304f5c8322040f277138333a3697 (diff) | |
download | minetest-180e551c56ec7229a15bfd9ce7339bc9881e1df6.tar.xz |
Modernize lua read (part 1): C++ templating insurance (#7394)
* Modernize lua read (part 1): C++ templating assurance
Implement the float reader
Diffstat (limited to 'src/script/lua_api/l_server.cpp')
-rw-r--r-- | src/script/lua_api/l_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_server.cpp b/src/script/lua_api/l_server.cpp index d663503e5..05d2a3349 100644 --- a/src/script/lua_api/l_server.cpp +++ b/src/script/lua_api/l_server.cpp @@ -455,8 +455,8 @@ int ModApiServer::l_sound_fade(lua_State *L) { NO_MAP_LOCK_REQUIRED; s32 handle = luaL_checkinteger(L, 1); - float step = luaL_checknumber(L, 2); - float gain = luaL_checknumber(L, 3); + float step = readParam<float>(L, 2); + float gain = readParam<float>(L, 3); getServer(L)->fadeSound(handle, step, gain); return 0; } |