From 97279aa68eef64f9e7e2da2704bab226698998c0 Mon Sep 17 00:00:00 2001 From: int3 Date: Sat, 28 Sep 2019 13:24:43 +0300 Subject: [PATCH] Fix: constructing basic_reference from basic_reference --- include/sol/reference.hpp | 4 ++-- single/include/sol/sol.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sol/reference.hpp b/include/sol/reference.hpp index 3859beab..d5fba1d5 100644 --- a/include/sol/reference.hpp +++ b/include/sol/reference.hpp @@ -557,11 +557,11 @@ namespace sol { } basic_reference(const basic_reference& 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(o.lua_state(), o.lua_state()), o) { } basic_reference(basic_reference&& o) noexcept - : stateless_reference(std::move(o)), luastate(detail::pick_main_thread(o.lua_state(), o.lua_state())) { + : stateless_reference(std::move(o)), luastate(detail::pick_main_thread(o.lua_state(), o.lua_state())) { o.luastate = nullptr; o.ref = LUA_NOREF; } diff --git a/single/include/sol/sol.hpp b/single/include/sol/sol.hpp index e3a63b79..9f986238 100644 --- a/single/include/sol/sol.hpp +++ b/single/include/sol/sol.hpp @@ -9142,11 +9142,11 @@ namespace sol { } basic_reference(const basic_reference& 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(o.lua_state(), o.lua_state()), o) { } basic_reference(basic_reference&& o) noexcept - : stateless_reference(std::move(o)), luastate(detail::pick_main_thread(o.lua_state(), o.lua_state())) { + : stateless_reference(std::move(o)), luastate(detail::pick_main_thread(o.lua_state(), o.lua_state())) { o.luastate = nullptr; o.ref = LUA_NOREF; }