cppcheck issue
This commit is contained in:
@@ -31,12 +31,11 @@ constexpr std::array<ButtonRow, 7> kButtonRows = {{
|
||||
|
||||
// Find the SettingInfo for a given (button submenu, press kind) pair in the shared settings list.
|
||||
const SettingInfo* findEntry(StrId submenu, StrId pressKind) {
|
||||
for (const auto& s : getSettingsList()) {
|
||||
if (s.submenu == submenu && s.nameId == pressKind && s.category == StrId::STR_CAT_CONTROLS) {
|
||||
return &s;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
const auto& list = getSettingsList();
|
||||
auto it = std::find_if(list.begin(), list.end(), [submenu, pressKind](const SettingInfo& s) {
|
||||
return s.submenu == submenu && s.nameId == pressKind && s.category == StrId::STR_CAT_CONTROLS;
|
||||
});
|
||||
return it != list.end() ? &*it : nullptr;
|
||||
}
|
||||
|
||||
std::string cellValue(StrId submenu, StrId pressKind) {
|
||||
|
||||
Reference in New Issue
Block a user