From daa9d296bd29fe52a0228be5efe5efc4f9944393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 9 Aug 2017 20:25:02 +0200 Subject: [PATCH] Code cleanup --- src/offlinemap.cpp | 2 +- src/ozf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/offlinemap.cpp b/src/offlinemap.cpp index 0f49a01f..d940045d 100644 --- a/src/offlinemap.cpp +++ b/src/offlinemap.cpp @@ -621,7 +621,7 @@ void OfflineMap::drawImage(QPainter *painter, const QRectF &rect) if (!_img || _img->isNull()) painter->fillRect(rect, Qt::white); else { - QRect r(rect.topLeft().toPoint(), rect.size().toSize()); + QRect r(rect.toRect()); painter->drawImage(rect.left(), rect.top(), *_img, r.left(), r.top(), r.width(), r.height()); } diff --git a/src/ozf.cpp b/src/ozf.cpp index 40c81826..5b405ba0 100644 --- a/src/ozf.cpp +++ b/src/ozf.cpp @@ -132,7 +132,7 @@ bool OZF::readTileTable() quint16 x, y; - if (!_file.seek(_file.size() - 4)) + if (!_file.seek(_file.size() - sizeof(offset))) return false; // table offset if (!readValue(offset))