Skip to content

Commit bcd33fb

Browse files
committed
xrScriptEngine/ScriptEngineScript.cpp: reformat script export section
1 parent d752ba2 commit bcd33fb

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

src/xrScriptEngine/ScriptEngineScript.cpp

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,32 @@ inline profile_timer_script operator+(const profile_timer_script& portion0, cons
143143
}
144144

145145
std::ostream& operator<<(std::ostream& os, const profile_timer_script& pt) { return os << pt.time(); }
146-
SCRIPT_EXPORT(CScriptEngine, (), {
146+
SCRIPT_EXPORT(CScriptEngine, (),
147+
{
147148
using namespace luabind;
148-
module(luaState)[class_<profile_timer_script>("profile_timer")
149-
.def(constructor<>())
150-
.def(constructor<profile_timer_script&>())
151-
.def(const_self + profile_timer_script())
152-
.def(const_self < profile_timer_script())
153-
.def(tostring(self))
154-
.def("start", &profile_timer_script::start)
155-
.def("stop", &profile_timer_script::stop)
156-
.def("time", &profile_timer_script::time),
157-
def("log", &LuaLog), def("error_log", &ErrorLog), def("flush", &FlushLogs), def("print_stack", &PrintStack),
158-
def("prefetch", &prefetch_module), def("verify_if_thread_is_running", &verify_if_thread_is_running),
159-
def("bit_and", &bit_and), def("bit_or", &bit_or), def("bit_xor", &bit_xor), def("bit_not", &bit_not),
160-
def("editor", &is_editor), def("user_name", &user_name)];
149+
module(luaState)
150+
[
151+
class_<profile_timer_script>("profile_timer")
152+
.def(constructor<>())
153+
.def(constructor<profile_timer_script&>())
154+
.def(const_self + profile_timer_script())
155+
.def(const_self < profile_timer_script())
156+
.def(tostring(self))
157+
.def("start", &profile_timer_script::start)
158+
.def("stop", &profile_timer_script::stop)
159+
.def("time", &profile_timer_script::time),
160+
161+
def("log", &LuaLog),
162+
def("error_log", &ErrorLog),
163+
def("flush", &FlushLogs),
164+
def("print_stack", &PrintStack),
165+
def("prefetch", &prefetch_module),
166+
def("verify_if_thread_is_running", &verify_if_thread_is_running),
167+
def("bit_and", &bit_and),
168+
def("bit_or", &bit_or),
169+
def("bit_xor", &bit_xor),
170+
def("bit_not", &bit_not),
171+
def("editor", &is_editor),
172+
def("user_name", &user_name)
173+
];
161174
});

0 commit comments

Comments
 (0)