| 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 | { |