Fix: constructing basic_reference<true> from basic_reference<false>

This commit is contained in:
int3 2019-09-28 13:24:43 +03:00 committed by The Phantom Derpstorm
parent 376806347f
commit 97279aa68e
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}