mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 09:59:48 +01:00
internal: create special vars instantly at addSpecialConfigValue
This commit is contained in:
parent
ebffe8f61d
commit
4a464738e2
1 changed files with 4 additions and 0 deletions
|
@ -85,6 +85,10 @@ void CConfig::addSpecialConfigValue(const char* cat, const char* name, const CCo
|
||||||
SConfigDefaultValue{reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->defaultVal, (eDataType)value.m_eType,
|
SConfigDefaultValue{reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->defaultVal, (eDataType)value.m_eType,
|
||||||
reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->handler,
|
reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->handler,
|
||||||
reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->dtor});
|
reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->dtor});
|
||||||
|
|
||||||
|
const auto CAT = std::find_if(impl->specialCategories.begin(), impl->specialCategories.end(), [cat](const auto& other) { return other->name == cat; });
|
||||||
|
if (CAT != impl->specialCategories.end())
|
||||||
|
CAT->get()->values[name].defaultFrom(IT->get()->defaultValues[name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfig::removeSpecialConfigValue(const char* cat, const char* name) {
|
void CConfig::removeSpecialConfigValue(const char* cat, const char* name) {
|
||||||
|
|
Loading…
Reference in a new issue