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

Method ProcessInput

vkconfig_core/setting_float.cpp:136–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136SettingInputError SettingDataFloat::ProcessInput(const std::string& input_value) {
137 if (input_value.empty()) return SETTING_INPUT_ERROR_EMPTY;
138
139 if (!IsFloat(input_value)) return SETTING_INPUT_ERROR_SYNTAX;
140
141 int saved_data = this->value;
142 this->value = std::atof(input_value.c_str());
143
144 if (!IsValid()) {
145 this->value = saved_data;
146 return SETTING_INPUT_ERROR_SEMENTICS;
147 }
148
149 return SETTING_INPUT_NO_ERROR;
150}
151
152bool SettingDataFloat::Equal(const SettingData& other) const {
153 if (!SettingData::Equal(other)) return false;

Callers

nothing calls this directly

Calls 1

IsFloatFunction · 0.85

Tested by

no test coverage detected