MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetFloat

Method GetFloat

src/openrct2/config/IniReader.cpp:176–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 }
175
176 float GetFloat(const std::string& name, float defaultValue) const override
177 {
178 float result = defaultValue;
179 std::string value;
180 if (TryGetString(name, &value))
181 {
182 try
183 {
184 result = std::stof(value);
185 }
186 catch (const std::exception&)
187 {
188 }
189 }
190 return result;
191 }
192
193 std::string GetString(const std::string& name, const std::string& defaultValue) const override
194 {

Callers 2

TEST_FFunction · 0.45
ReadGeneralFunction · 0.45

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.36