mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
cppcheck fix
This commit is contained in:
parent
17c20db930
commit
2a94648828
@ -257,7 +257,7 @@ void EpubReaderActivity::jumpToPercent(int percent) {
|
|||||||
size_t targetSize =
|
size_t targetSize =
|
||||||
(bookSize / 100) * static_cast<size_t>(percent) +
|
(bookSize / 100) * static_cast<size_t>(percent) +
|
||||||
(bookSize % 100) * static_cast<size_t>(percent) / 100;
|
(bookSize % 100) * static_cast<size_t>(percent) / 100;
|
||||||
if (percent >= 100 && bookSize > 0) {
|
if (percent >= 100) {
|
||||||
// Ensure the final percent lands inside the last spine item.
|
// Ensure the final percent lands inside the last spine item.
|
||||||
targetSize = bookSize - 1;
|
targetSize = bookSize - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user