cppcheck
This commit is contained in:
@@ -430,8 +430,7 @@ void Menu::setSelectorPos(int index) {
|
||||
|
||||
// Obtiene la anchura del elemento más ancho del menu
|
||||
int Menu::getWidestItem() {
|
||||
return std::accumulate(item.begin(), item.end(), 0,
|
||||
[](int acc, const item_t &i) { return std::max(acc, i.rect.w); });
|
||||
return std::accumulate(item.begin(), item.end(), 0, [](int acc, const item_t &i) { return std::max(acc, i.rect.w); });
|
||||
}
|
||||
|
||||
// Deja el menu apuntando al primer elemento
|
||||
@@ -792,8 +791,7 @@ int Menu::findWidth() {
|
||||
|
||||
// Calcula el alto del menu
|
||||
int Menu::findHeight() {
|
||||
const int height = std::accumulate(item.begin(), item.end(), 0,
|
||||
[](int acc, const item_t &i) { return acc + i.rect.h + i.hPaddingDown; });
|
||||
const int height = std::accumulate(item.begin(), item.end(), 0, [](int acc, const item_t &i) { return acc + i.rect.h + i.hPaddingDown; });
|
||||
|
||||
return height - item.back().hPaddingDown;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user