Skip to content

Refactor our redundant Lua API functions to use templatesΒ #1765

Open
@Pirulax

Description

@Pirulax

Is your feature request related to a problem? Please describe.
There are 2 places where we have copy pasted code that can be easily "templateized":

  • CLuaArgument - PushACL, PushElement`, etc..
  • LuaCommon - Ex.: lua_pushacl, lua_pushelement, etc..

Describe the solution you'd like
We can use some generic programming magic (aka templates)

Describe alternatives you've considered
Leave it like it is

Additional context
We can use Visual Studio's Edit->Refactor option. It's really convenient, this issue can be solved in an hour (or ideally less)
I don't think following Lua's convention is necessary, as it just adds redundant code. Lua has different function names, because C doesn't have templates, but this ain't C, but C++, so... We might as well make use of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions