MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / SetValueFromString

Method SetValueFromString

src/engine/ConsoleObjects.cpp:388–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386 }
387
388 virtual bool SetValueFromString(std::string_view s, SetBy setby) override
389 {
390 if (!s.empty())
391 if (auto value = ds::parse<T>(s))
392 return this->SetData(*value, setby);
393
394 donut::log::error("cvar '%s' failed parsing value string '%s' (expected a %s) - value not set",
395 this->GetName().c_str(), std::string(s).c_str(), AsString((VariableType::Type)m_State.type));
396 return false;
397 }
398
399 virtual bool SetValueFromString(std::string const& s, SetBy setby) override
400 {

Callers 2

ParseIniFileFunction · 0.80
ExecuteMethod · 0.80

Calls 4

SetDataMethod · 0.95
errorFunction · 0.85
AsStringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected