diff --git a/include/hyprlang.hpp b/include/hyprlang.hpp index 66497de..7b6a2e0 100644 --- a/include/hyprlang.hpp +++ b/include/hyprlang.hpp @@ -299,11 +299,13 @@ namespace Hyprlang { void removeSpecialCategory(const char* name); /*! - \since 0.3.0 + \since 0.3.2 Add a config value to a special category. + + \note Before 0.3.2, this takes a `const CConfigValue` (non-ref) */ - void addSpecialConfigValue(const char* cat, const char* name, const CConfigValue value); + void addSpecialConfigValue(const char* cat, const char* name, const CConfigValue& value); /*! Remove a config value from a special category. diff --git a/src/config.cpp b/src/config.cpp index fd5d707..7d8dff9 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -70,7 +70,7 @@ void CConfig::addConfigValue(const char* name, const CConfigValue& value) { reinterpret_cast(value.m_pData)->dtor}); } -void CConfig::addSpecialConfigValue(const char* cat, const char* name, const CConfigValue value) { +void CConfig::addSpecialConfigValue(const char* cat, const char* name, const CConfigValue& value) { const auto IT = std::find_if(impl->specialCategoryDescriptors.begin(), impl->specialCategoryDescriptors.end(), [&](const auto& other) { return other->name == cat; }); if (IT == impl->specialCategoryDescriptors.end())