Fix MSVC compiler warning
reg. declaration of 'role' hides function parameter (C4457)
This commit is contained in:
parent
f05674be79
commit
616a2c96e8
1 changed files with 4 additions and 4 deletions
|
@ -63,11 +63,11 @@ QList<int> ButtonBoxModel::load()
|
|||
|
||||
const std::vector<ButtonRole>& currentLayout = chooseButtonLayoutType();
|
||||
|
||||
auto buttonsByRole = [&sortedButtons, maxCustomRole](ButtonRole role) -> std::vector<LayoutButton*> {
|
||||
bool isCustom = role == ButtonRole::CustomRole;
|
||||
auto buttonsByRole = [&sortedButtons, maxCustomRole](ButtonRole buttonRole) -> std::vector<LayoutButton*> {
|
||||
bool isCustom = buttonRole == ButtonRole::CustomRole;
|
||||
if (!isCustom) {
|
||||
if (contains(sortedButtons, static_cast<int>(role))) {
|
||||
return sortedButtons[role];
|
||||
if (contains(sortedButtons, static_cast<int>(buttonRole))) {
|
||||
return sortedButtons[buttonRole];
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue