mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
Modernize lua read (part 1): C++ templating insurance (#7394)
* Modernize lua read (part 1): C++ templating assurance Implement the float reader
This commit is contained in:
@@ -190,7 +190,7 @@ int MetaDataRef::l_set_float(lua_State *L)
|
||||
|
||||
MetaDataRef *ref = checkobject(L, 1);
|
||||
std::string name = luaL_checkstring(L, 2);
|
||||
float a = luaL_checknumber(L, 3);
|
||||
float a = readParam<float>(L, 3);
|
||||
std::string str = ftos(a);
|
||||
|
||||
Metadata *meta = ref->getmeta(true);
|
||||
|
Reference in New Issue
Block a user