| 402 | |
| 403 | |
| 404 | void syncUpdates() { |
| 405 | if (settings::token.empty()) |
| 406 | return; |
| 407 | |
| 408 | // updateInfos could possibly change in the checkUpdates() thread, but checkUpdates() will not execute if syncUpdate() is running, so the chance of the updateInfos map being modified while iterating is rare. |
| 409 | auto updateInfosClone = updateInfos; |
| 410 | for (auto& pair : updateInfosClone) { |
| 411 | syncUpdate(pair.first); |
| 412 | } |
| 413 | restartRequested = true; |
| 414 | } |
| 415 | |
| 416 | |
| 417 | std::string appVersion; |
no test coverage detected