| 62 | } |
| 63 | |
| 64 | bool MemorySettingsInterface::GetFloatValue(const char* section, const char* key, float* value) const |
| 65 | { |
| 66 | const auto sit = m_sections.find(section); |
| 67 | if (sit == m_sections.end()) |
| 68 | return false; |
| 69 | |
| 70 | const auto iter = sit->second.find(key); |
| 71 | if (iter == sit->second.end()) |
| 72 | return false; |
| 73 | |
| 74 | std::optional<float> parsed = StringUtil::FromChars<float>(iter->second); |
| 75 | if (!parsed.has_value()) |
| 76 | return false; |
| 77 | |
| 78 | *value = parsed.value(); |
| 79 | return true; |
| 80 | } |
| 81 | |
| 82 | bool MemorySettingsInterface::GetDoubleValue(const char* section, const char* key, double* value) const |
| 83 | { |