cppcheck complaint
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
#include <HalStorage.h>
|
#include <HalStorage.h>
|
||||||
#include <I18n.h>
|
#include <I18n.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "CrossPointSettings.h"
|
#include "CrossPointSettings.h"
|
||||||
#include "CrossPointState.h"
|
#include "CrossPointState.h"
|
||||||
#include "MappedInputManager.h"
|
#include "MappedInputManager.h"
|
||||||
@@ -462,12 +464,11 @@ void XtcReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
|
|||||||
case BA::BTN_NEXT_SECTION:
|
case BA::BTN_NEXT_SECTION:
|
||||||
if (xtc->hasChapters()) {
|
if (xtc->hasChapters()) {
|
||||||
const auto& chapters = xtc->getChapters();
|
const auto& chapters = xtc->getChapters();
|
||||||
for (const auto& ch : chapters) {
|
const auto it = std::find_if(chapters.begin(), chapters.end(),
|
||||||
if (ch.startPage > currentPage) {
|
[this](const auto& ch) { return ch.startPage > currentPage; });
|
||||||
currentPage = ch.startPage;
|
if (it != chapters.end()) {
|
||||||
requestUpdate();
|
currentPage = it->startPage;
|
||||||
break;
|
requestUpdate();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user