Skip to content

Commit

Permalink
Adjusted exported functions to use separate overloads for start.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neloreck committed Jan 19, 2025
1 parent 8ab3dc0 commit ee02f2a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/xrScriptEngine/ScriptEngineScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,19 @@ SCRIPT_EXPORT(CScriptEngine, (),

module(luaState, "profiler")
[
def("is_active", +[]()
def("is_active", +[]() -> bool
{
GEnv.ScriptEngine->m_profiler->isActive();
return GEnv.ScriptEngine->m_profiler->isActive();
}),
def("get_type", +[]()
def("get_type", +[]()-> u32
{
GEnv.ScriptEngine->m_profiler->getType();
return static_cast<u32>(GEnv.ScriptEngine->m_profiler->getType());
}),
def("start", +[](CScriptProfilerType hook_type = CScriptProfilerType::None)
def("start", +[]()
{
GEnv.ScriptEngine->m_profiler->start();
}),
def("start", +[](CScriptProfilerType hook_type)
{
GEnv.ScriptEngine->m_profiler->start(hook_type);
}),
Expand Down

0 comments on commit ee02f2a

Please sign in to comment.