Browse Source

Initialize variable

Fixes coverity CID 161628
adaptive-webui-19844
Chocobo1 8 years ago
parent
commit
562080de69
  1. 2
      src/base/utils/version.h

2
src/base/utils/version.h

@ -167,7 +167,7 @@ namespace Utils
throw std::runtime_error ("Incorrect number of version components"); throw std::runtime_error ("Incorrect number of version components");
bool ok = false; bool ok = false;
ComponentsArray res; ComponentsArray res{};
for (std::size_t i = 0; i < static_cast<std::size_t>(versionParts.size()); ++i) { for (std::size_t i = 0; i < static_cast<std::size_t>(versionParts.size()); ++i) {
res[i] = static_cast<T>(versionParts[i].toInt(&ok)); res[i] = static_cast<T>(versionParts[i].toInt(&ok));
if (!ok) if (!ok)

Loading…
Cancel
Save