From d1e9d357b9810ad65611d6ee8dd1bc8ce1b4f774 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 8 Apr 2017 06:08:46 +0200 Subject: [PATCH] Trying to reduce int types warnings. --- src/GUI/AircraftModel.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GUI/AircraftModel.cxx b/src/GUI/AircraftModel.cxx index bd6b91d0d..9fdb77955 100644 --- a/src/GUI/AircraftModel.cxx +++ b/src/GUI/AircraftModel.cxx @@ -420,10 +420,10 @@ protected: // notify any affected items. Linear scan here avoids another map/dict structure. for (auto pkg : m_model->m_packages) { - const int variantCount = pkg->variants().size(); + const size_t variantCount = pkg->variants().size(); bool notifyChanged = false; - for (int v=0; v < variantCount; ++v) { + for (size_t v=0; v < variantCount; ++v) { const Package::Thumbnail& thumb(pkg->thumbnailForVariant(v)); if (thumb.url == aThumbnailUrl) { notifyChanged = true; @@ -446,7 +446,7 @@ private: return QModelIndex(); } - size_t offset = it - m_model->m_packages.begin(); + int offset = std::distance(m_model->m_packages.begin(), it); return m_model->index(offset + m_model->m_items.size()); }