fix: may be used uninitialized

Dieser Commit ist enthalten in:
Reinder Feenstra 2022-04-03 13:13:29 +02:00
Ursprung 7767d5b06a
Commit 4bf74802f1

Datei anzeigen

@ -137,8 +137,8 @@ void Locomotive::update(std::string_view option, std::string_view value)
if(option == Option::speedStep)
{
uint8_t v;
fromChars(value, v);
m_speedStep = v;
if(auto r = fromChars(value, v); r.ec == std::errc())
m_speedStep = v;
}
else if(option == Option::dir)
{