summaryrefslogtreecommitdiff
path: root/src/tangara/lua/property.cpp
diff options
context:
space:
mode:
authorcooljqln <cooljqln@noreply.codeberg.org>2024-09-19 04:44:16 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2024-09-19 04:44:16 +0000
commit1eddfe97d9398215d4512785c669cf7cc94b6223 (patch)
tree6b7223e9c0e677705ec3ccfd5846f8fe0cdebeb1 /src/tangara/lua/property.cpp
parent9aa77ec5ad369cd7d5ca46d475df29d971416a73 (diff)
parent7f43d4d1265ce7f456b36f51987c812d35bcd616 (diff)
downloadtangara-fw-1eddfe97d9398215d4512785c669cf7cc94b6223.tar.gz
Merge pull request 'daniel/persistent-positions' (#104) from daniel/persistent-positions into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/104 Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
Diffstat (limited to 'src/tangara/lua/property.cpp')
-rw-r--r--src/tangara/lua/property.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/tangara/lua/property.cpp b/src/tangara/lua/property.cpp
index 1be1fd2d..847bbe15 100644
--- a/src/tangara/lua/property.cpp
+++ b/src/tangara/lua/property.cpp
@@ -19,6 +19,7 @@
#include "lauxlib.h"
#include "lua.h"
#include "lua.hpp"
+#include "lua/lua_database.hpp"
#include "lua/lua_thread.hpp"
#include "lvgl.h"
#include "memory_resource.hpp"
@@ -240,29 +241,6 @@ auto Property::set(const LuaValue& val) -> bool {
return true;
}
-static auto pushTagValue(lua_State* L, const database::TagValue& val) -> void {
- std::visit(
- [&](auto&& arg) {
- using T = std::decay_t<decltype(arg)>;
- if constexpr (std::is_same_v<T, std::pmr::string>) {
- lua_pushlstring(L, arg.data(), arg.size());
- } else if constexpr (std::is_same_v<
- T, std::span<const std::pmr::string>>) {
- lua_createtable(L, 0, arg.size());
- for (const auto& i : arg) {
- lua_pushlstring(L, i.data(), i.size());
- lua_pushboolean(L, true);
- lua_rawset(L, -3);
- }
- } else if constexpr (std::is_same_v<T, uint32_t>) {
- lua_pushinteger(L, arg);
- } else {
- lua_pushnil(L);
- }
- },
- val);
-}
-
static void pushTrack(lua_State* L, const audio::TrackInfo& track) {
lua_newtable(L);