From ea8a7b0f93aa3b391e92d7b930f667d1ff439d04 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 17 Jan 2024 17:31:45 +1100 Subject: allocate lua properties in spi ram --- src/lua/include/property.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lua/include') diff --git a/src/lua/include/property.hpp b/src/lua/include/property.hpp index 425cc15c..03229bc1 100644 --- a/src/lua/include/property.hpp +++ b/src/lua/include/property.hpp @@ -35,7 +35,7 @@ class Property { Property(const LuaValue&); Property(const LuaValue&, std::function); - auto Get() -> const LuaValue& { return value_; } + auto Get() -> const LuaValue& { return *value_; } auto IsTwoWay() -> bool { return cb_.has_value(); } @@ -46,7 +46,7 @@ class Property { auto AddLuaBinding(lua_State*, int ref) -> void; private: - LuaValue value_; + std::unique_ptr value_; std::optional> cb_; std::pmr::vector> bindings_; }; -- cgit v1.2.3