diff options
Diffstat (limited to 'src/universe.cpp')
-rw-r--r-- | src/universe.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/universe.cpp b/src/universe.cpp index 062d552..4dce427 100644 --- a/src/universe.cpp +++ b/src/universe.cpp | |||
@@ -60,8 +60,7 @@ Universe::Universe() | |||
60 | // the launched threads (even -2). | 60 | // the launched threads (even -2). |
61 | // | 61 | // |
62 | #ifdef LINUX_SCHED_RR | 62 | #ifdef LINUX_SCHED_RR |
63 | if (m_sudo) | 63 | if (m_sudo) { |
64 | { | ||
65 | struct sched_param sp; | 64 | struct sched_param sp; |
66 | sp.sched_priority = _PRIO_0; | 65 | sp.sched_priority = _PRIO_0; |
67 | PT_CALL(pthread_setschedparam(pthread_self(), SCHED_RR, &sp)); | 66 | PT_CALL(pthread_setschedparam(pthread_self(), SCHED_RR, &sp)); |
@@ -87,11 +86,11 @@ Universe* universe_create(lua_State* L_) | |||
87 | 86 | ||
88 | // ################################################################################################# | 87 | // ################################################################################################# |
89 | 88 | ||
90 | void universe_store(lua_State* L_, Universe* U) | 89 | void universe_store(lua_State* L_, Universe* U_) |
91 | { | 90 | { |
92 | LUA_ASSERT(L_, !U || universe_get(L_) == nullptr); | 91 | LUA_ASSERT(L_, !U_ || universe_get(L_) == nullptr); |
93 | STACK_CHECK_START_REL(L_, 0); | 92 | STACK_CHECK_START_REL(L_, 0); |
94 | kUniverseLightRegKey.setValue(L_, [U](lua_State* L_) { U ? lua_pushlightuserdata(L_, U) : lua_pushnil(L_); }); | 93 | kUniverseLightRegKey.setValue(L_, [U = U_](lua_State* L_) { U ? lua_pushlightuserdata(L_, U) : lua_pushnil(L_); }); |
95 | STACK_CHECK(L_, 0); | 94 | STACK_CHECK(L_, 0); |
96 | } | 95 | } |
97 | 96 | ||