MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / Load

Method Load

vkconfig_core/setting_int.cpp:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41bool SettingMetaInt::Load(const QJsonObject& json_setting) {
42 this->default_value = ReadIntValue(json_setting, "default");
43 if (json_setting.value("range") != QJsonValue::Undefined) {
44 const QJsonObject& json_setting_range = ReadObject(json_setting, "range");
45 if (json_setting_range.value("min") != QJsonValue::Undefined) {
46 this->min_value = ReadIntValue(json_setting_range, "min");
47 }
48 if (json_setting_range.value("max") != QJsonValue::Undefined) {
49 this->max_value = ReadIntValue(json_setting_range, "max");
50 }
51 }
52 if (json_setting.value("unit") != QJsonValue::Undefined) {
53 this->unit = ReadStringValue(json_setting, "unit");
54 }
55
56 return true;
57}
58
59std::string SettingMetaInt::Export(ExportMode export_mode) const {
60 (void)export_mode;

Callers

nothing calls this directly

Calls 4

ReadIntValueFunction · 0.85
ReadObjectFunction · 0.85
ReadStringValueFunction · 0.85
ReadBoolValueFunction · 0.85

Tested by

no test coverage detected