- Fix ignored return value in TxtReaderActivity - Remove unused variables across multiple files - Add const correctness to DictionaryMargins and EpubReaderActivity - Replace inefficient substr patterns with resize+append - Use STL algorithms (find_if, any_of, copy_if, transform) where applicable - Remove dead sync placeholder code in EpubReaderChapterSelectionActivity - Add cppcheck suppression for ValueFlow analysis limitation Resolves all low, medium, and high severity cppcheck defects.
This commit is contained in:
@@ -386,9 +386,7 @@ void EpubReaderActivity::loop() {
|
||||
[this](QuickMenuAction action) {
|
||||
// Cache values before exitActivity
|
||||
EpubReaderActivity* self = this;
|
||||
GfxRenderer& cachedRenderer = renderer;
|
||||
MappedInputManager& cachedMappedInput = mappedInput;
|
||||
Section* cachedSection = section.get();
|
||||
const Section* cachedSection = section.get();
|
||||
SemaphoreHandle_t cachedMutex = renderingMutex;
|
||||
|
||||
exitActivity();
|
||||
@@ -938,7 +936,8 @@ void EpubReaderActivity::renderEndOfBookPrompt() {
|
||||
// Book title (truncated if needed)
|
||||
std::string bookTitle = epub->getTitle();
|
||||
if (bookTitle.length() > 30) {
|
||||
bookTitle = bookTitle.substr(0, 27) + "...";
|
||||
bookTitle.resize(27);
|
||||
bookTitle += "...";
|
||||
}
|
||||
renderer.drawCenteredText(UI_10_FONT_ID, 120, bookTitle.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user