@@ -14,132 +14,23 @@ bool LayeredSettingsInterface::IsEmpty()
1414 return false ;
1515}
1616
17- bool LayeredSettingsInterface::GetIntValue (const char * section, const char * key, s32 * value) const
17+ bool LayeredSettingsInterface::LookupValue (const char * section, const char * key, std::string_view * value) const
1818{
1919 for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
2020 {
2121 if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
2222 {
23- if (sif->GetIntValue (section, key, value))
23+ if (sif->LookupValue (section, key, value))
2424 return true ;
2525 }
2626 }
2727
2828 return false ;
2929}
3030
31- bool LayeredSettingsInterface::GetUIntValue (const char * section, const char * key, u32 * value) const
31+ void LayeredSettingsInterface::StoreValue (const char * section, const char * key, std::string_view value)
3232{
33- for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
34- {
35- if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
36- {
37- if (sif->GetUIntValue (section, key, value))
38- return true ;
39- }
40- }
41-
42- return false ;
43- }
44-
45- bool LayeredSettingsInterface::GetFloatValue (const char * section, const char * key, float * value) const
46- {
47- for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
48- {
49- if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
50- {
51- if (sif->GetFloatValue (section, key, value))
52- return true ;
53- }
54- }
55-
56- return false ;
57- }
58-
59- bool LayeredSettingsInterface::GetDoubleValue (const char * section, const char * key, double * value) const
60- {
61- for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
62- {
63- if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
64- {
65- if (sif->GetDoubleValue (section, key, value))
66- return true ;
67- }
68- }
69-
70- return false ;
71- }
72-
73- bool LayeredSettingsInterface::GetBoolValue (const char * section, const char * key, bool * value) const
74- {
75- for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
76- {
77- if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
78- {
79- if (sif->GetBoolValue (section, key, value))
80- return true ;
81- }
82- }
83-
84- return false ;
85- }
86-
87- bool LayeredSettingsInterface::GetStringValue (const char * section, const char * key, std::string* value) const
88- {
89- for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
90- {
91- if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
92- {
93- if (sif->GetStringValue (section, key, value))
94- return true ;
95- }
96- }
97-
98- return false ;
99- }
100-
101- bool LayeredSettingsInterface::GetStringValue (const char * section, const char * key, SmallStringBase* value) const
102- {
103- for (u32 layer = FIRST_LAYER; layer <= LAST_LAYER; layer++)
104- {
105- if (SettingsInterface* sif = m_layers[layer]; sif != nullptr )
106- {
107- if (sif->GetStringValue (section, key, value))
108- return true ;
109- }
110- }
111-
112- return false ;
113- }
114-
115- void LayeredSettingsInterface::SetIntValue (const char * section, const char * key, int value)
116- {
117- Panic (" Attempt to call SetIntValue() on layered settings interface" );
118- }
119-
120- void LayeredSettingsInterface::SetUIntValue (const char * section, const char * key, u32 value)
121- {
122- Panic (" Attempt to call SetUIntValue() on layered settings interface" );
123- }
124-
125- void LayeredSettingsInterface::SetFloatValue (const char * section, const char * key, float value)
126- {
127- Panic (" Attempt to call SetFloatValue() on layered settings interface" );
128- }
129-
130- void LayeredSettingsInterface::SetDoubleValue (const char * section, const char * key, double value)
131- {
132- Panic (" Attempt to call SetDoubleValue() on layered settings interface" );
133- }
134-
135- void LayeredSettingsInterface::SetBoolValue (const char * section, const char * key, bool value)
136- {
137- Panic (" Attempt to call SetBoolValue() on layered settings interface" );
138- }
139-
140- void LayeredSettingsInterface::SetStringValue (const char * section, const char * key, const char * value)
141- {
142- Panic (" Attempt to call SetStringValue() on layered settings interface" );
33+ Panic (" Attempt to call StoreValue() on layered settings interface" );
14334}
14435
14536bool LayeredSettingsInterface::ContainsValue (const char * section, const char * key) const
0 commit comments