summaryrefslogtreecommitdiff
path: root/src/config/ConfigValue.hpp
diff options
context:
space:
mode:
authorMightyPlaza <123664421+MightyPlaza@users.noreply.github.com>2025-04-15 23:00:40 +0000
committerGitHub <noreply@github.com>2025-04-16 01:00:40 +0200
commitffd6cf65e40a7140e82dc6e076c90b5119d41a54 (patch)
tree0ccf8c15626b26d1eef39d880fd0a10533bdb489 /src/config/ConfigValue.hpp
parent8b7b169043de2a9d95f8505edb8b6576fac586fd (diff)
windowrules: allow incrementing window props (#9566)
Diffstat (limited to 'src/config/ConfigValue.hpp')
-rw-r--r--src/config/ConfigValue.hpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/config/ConfigValue.hpp b/src/config/ConfigValue.hpp
index 089ae8bf..a159bf8c 100644
--- a/src/config/ConfigValue.hpp
+++ b/src/config/ConfigValue.hpp
@@ -4,21 +4,19 @@
#include <typeindex>
#include <hyprlang.hpp>
#include "../macros.hpp"
-#include "ConfigManager.hpp"
+
+// giga hack to avoid including configManager here
+// NOLINTNEXTLINE
+void local__configValuePopulate(void* const** p, const std::string& val);
+std::type_index local__configValueTypeIdx(const std::string& val);
template <typename T>
class CConfigValue {
public:
CConfigValue(const std::string& val) {
- const auto PVHYPRLANG = g_pConfigManager->getHyprlangConfigValuePtr(val);
-
- // NOLINTNEXTLINE
- p_ = PVHYPRLANG->getDataStaticPtr();
-
#ifdef HYPRLAND_DEBUG
// verify type
- const auto ANY = PVHYPRLANG->getValue();
- const auto TYPE = std::type_index(ANY.type());
+ const auto TYPE = local__configValueTypeIdx(val);
// exceptions
const bool STRINGEX = (typeid(T) == typeid(std::string) && TYPE == typeid(Hyprlang::STRING));
@@ -26,6 +24,8 @@ class CConfigValue {
RASSERT(typeid(T) == TYPE || STRINGEX || CUSTOMEX, "Mismatched type in CConfigValue<T>, got {} but has {}", typeid(T).name(), TYPE.name());
#endif
+
+ local__configValuePopulate(&p_, val);
}
T* ptr() const {