diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-01-17 15:31:23 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-01-17 15:31:23 +1100 |
| commit | 1f5249de6f7e81aa6ff2586e386f526676e67c81 (patch) | |
| tree | 5fcc9737e71b3b6b20b7156ea4e759b558f732a3 /src/lua/property.cpp | |
| parent | 08d16e858075e66df1bae3fea9d955e1b6cb73a9 (diff) | |
| download | tangara-fw-1f5249de6f7e81aa6ff2586e386f526676e67c81.tar.gz | |
shift some long-lived allocs into spi ram
Diffstat (limited to 'src/lua/property.cpp')
| -rw-r--r-- | src/lua/property.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/property.cpp b/src/lua/property.cpp index 2d702447..14056af7 100644 --- a/src/lua/property.cpp +++ b/src/lua/property.cpp @@ -17,6 +17,7 @@ #include "lua.hpp" #include "lua_thread.hpp" #include "lvgl.h" +#include "memory_resource.hpp" #include "service_locator.hpp" #include "track.hpp" #include "types.hpp" @@ -158,11 +159,12 @@ auto PropertyBindings::GetFunction(size_t i) -> const LuaFunction& { template <class... Ts> inline constexpr bool always_false_v = false; -Property::Property(const LuaValue& val) : value_(val), cb_() {} +Property::Property(const LuaValue& val) + : value_(val), cb_(), bindings_(&memory::kSpiRamResource) {} Property::Property(const LuaValue& val, std::function<bool(const LuaValue& val)> cb) - : value_(val), cb_(cb) {} + : value_(val), cb_(cb), bindings_(&memory::kSpiRamResource) {} static auto pushTagValue(lua_State* L, const database::TagValue& val) -> void { std::visit( |
