cppcheck 2
This commit is contained in:
@@ -603,7 +603,6 @@ void FinishedBookActivity::render(RenderLock&&) {
|
|||||||
|
|
||||||
if (nextBookAvailable_) {
|
if (nextBookAvailable_) {
|
||||||
int actualCoverWidth = 0;
|
int actualCoverWidth = 0;
|
||||||
int actualCoverHeight = 0;
|
|
||||||
int previewTextX = previewX;
|
int previewTextX = previewX;
|
||||||
|
|
||||||
if (!nextBookCoverPath_.empty()) {
|
if (!nextBookCoverPath_.empty()) {
|
||||||
@@ -612,7 +611,7 @@ void FinishedBookActivity::render(RenderLock&&) {
|
|||||||
if (coverFile) {
|
if (coverFile) {
|
||||||
Bitmap bmp(coverFile);
|
Bitmap bmp(coverFile);
|
||||||
if (bmp.parseHeaders() == BmpReaderError::Ok && bmp.getWidth() > 0 && bmp.getHeight() > 0) {
|
if (bmp.parseHeaders() == BmpReaderError::Ok && bmp.getWidth() > 0 && bmp.getHeight() > 0) {
|
||||||
actualCoverHeight = previewHeight;
|
int actualCoverHeight = previewHeight;
|
||||||
actualCoverWidth = bmp.getWidth() * actualCoverHeight / bmp.getHeight();
|
actualCoverWidth = bmp.getWidth() * actualCoverHeight / bmp.getHeight();
|
||||||
if (actualCoverWidth > previewWidth) {
|
if (actualCoverWidth > previewWidth) {
|
||||||
actualCoverWidth = previewWidth;
|
actualCoverWidth = previewWidth;
|
||||||
|
|||||||
Reference in New Issue
Block a user