mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +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:
@@ -71,4 +71,15 @@ public:
|
||||
int top);
|
||||
|
||||
static bool isNaN(lua_State *L, int idx);
|
||||
|
||||
/**
|
||||
* Read a value using a template type T from Lua State L and index
|
||||
*
|
||||
* @tparam T type to read from Lua
|
||||
* @param L Lua state
|
||||
* @param index Lua Index to read
|
||||
* @return read value from Lua
|
||||
*/
|
||||
template<typename T>
|
||||
static T readParam(lua_State *L, int index);
|
||||
};
|
||||
|
Reference in New Issue
Block a user