mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 09:59:48 +01:00
API: make addSpecialConfigValue take a ref to val
woo breaking API and ABI
This commit is contained in:
parent
a3b1a6b649
commit
ebffe8f61d
2 changed files with 5 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -70,7 +70,7 @@ void CConfig::addConfigValue(const char* name, const CConfigValue& value) {
|
|||
reinterpret_cast<CConfigCustomValueType*>(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())
|
||||
|
|
Loading…
Reference in a new issue