1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Initialize variable

Fixes coverity CID 161628
This commit is contained in:
Chocobo1 2017-05-20 11:38:39 +08:00
parent c3b1c57d67
commit 562080de69

View File

@ -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)