Skip to content

Commit ee02f2a

Browse files
committed
Adjusted exported functions to use separate overloads for start.
1 parent 8ab3dc0 commit ee02f2a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/xrScriptEngine/ScriptEngineScript.cpp

+9-5
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,19 @@ SCRIPT_EXPORT(CScriptEngine, (),
172172

173173
module(luaState, "profiler")
174174
[
175-
def("is_active", +[]()
175+
def("is_active", +[]() -> bool
176176
{
177-
GEnv.ScriptEngine->m_profiler->isActive();
177+
return GEnv.ScriptEngine->m_profiler->isActive();
178178
}),
179-
def("get_type", +[]()
179+
def("get_type", +[]()-> u32
180180
{
181-
GEnv.ScriptEngine->m_profiler->getType();
181+
return static_cast<u32>(GEnv.ScriptEngine->m_profiler->getType());
182182
}),
183-
def("start", +[](CScriptProfilerType hook_type = CScriptProfilerType::None)
183+
def("start", +[]()
184+
{
185+
GEnv.ScriptEngine->m_profiler->start();
186+
}),
187+
def("start", +[](CScriptProfilerType hook_type)
184188
{
185189
GEnv.ScriptEngine->m_profiler->start(hook_type);
186190
}),

0 commit comments

Comments
 (0)