Fix cppcheck reported issues (#333)

Fixes: https://github.com/microsoft/PowerToys/issues/266
This commit is contained in:
Bartosz Sosnowski
2019-09-11 12:38:20 +02:00
committed by GitHub
parent 12cd7bb49f
commit 8ac6db8b5a
19 changed files with 34 additions and 36 deletions

View File

@@ -79,7 +79,7 @@ bool Tasklist::update_buttons(std::vector<TasklistButton>& buttons) {
continue; // skip buttons from the same app
button.keynum = buttons.back().keynum + 1;
buttons.push_back(std::move(button));
if (button.keynum == 10)
if (buttons.back().keynum == 10)
break; // no more than 10 buttons
}
}