mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix: constructing basic_reference<true> from basic_reference<false>
This commit is contained in:
parent
376806347f
commit
97279aa68e
|
@ -557,11 +557,11 @@ namespace sol {
|
|||
}
|
||||
|
||||
basic_reference(const basic_reference<!main_only>& o) noexcept
|
||||
: basic_reference(detail::pick_main_thread < main_only && !main_only > (o.lua_state(), o.lua_state()), o) {
|
||||
: basic_reference(detail::pick_main_thread<main_only>(o.lua_state(), o.lua_state()), o) {
|
||||
}
|
||||
|
||||
basic_reference(basic_reference<!main_only>&& o) noexcept
|
||||
: stateless_reference(std::move(o)), luastate(detail::pick_main_thread<main_only && !main_only>(o.lua_state(), o.lua_state())) {
|
||||
: stateless_reference(std::move(o)), luastate(detail::pick_main_thread<main_only>(o.lua_state(), o.lua_state())) {
|
||||
o.luastate = nullptr;
|
||||
o.ref = LUA_NOREF;
|
||||
}
|
||||
|
|
|
@ -9142,11 +9142,11 @@ namespace sol {
|
|||
}
|
||||
|
||||
basic_reference(const basic_reference<!main_only>& o) noexcept
|
||||
: basic_reference(detail::pick_main_thread < main_only && !main_only > (o.lua_state(), o.lua_state()), o) {
|
||||
: basic_reference(detail::pick_main_thread<main_only>(o.lua_state(), o.lua_state()), o) {
|
||||
}
|
||||
|
||||
basic_reference(basic_reference<!main_only>&& o) noexcept
|
||||
: stateless_reference(std::move(o)), luastate(detail::pick_main_thread<main_only && !main_only>(o.lua_state(), o.lua_state())) {
|
||||
: stateless_reference(std::move(o)), luastate(detail::pick_main_thread<main_only>(o.lua_state(), o.lua_state())) {
|
||||
o.luastate = nullptr;
|
||||
o.ref = LUA_NOREF;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user