From 60a059078c98d6d1427cbf05e6929f18e417571d Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Thu, 10 Oct 2024 11:00:32 -0400 Subject: [PATCH] fixed missing static cast on size_t to int convertion --- scwx-qt/source/scwx/qt/model/marker_model.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scwx-qt/source/scwx/qt/model/marker_model.cpp b/scwx-qt/source/scwx/qt/model/marker_model.cpp index ed8c67dc..9a046954 100644 --- a/scwx-qt/source/scwx/qt/model/marker_model.cpp +++ b/scwx-qt/source/scwx/qt/model/marker_model.cpp @@ -244,10 +244,11 @@ bool MarkerModel::setData(const QModelIndex& index, void MarkerModel::HandleMarkersInitialized(size_t count) { + const int index = static_cast(count - 1); QModelIndex topLeft = createIndex(0, kFirstColumn); - QModelIndex bottomRight = createIndex(count - 1, kLastColumn); + QModelIndex bottomRight = createIndex(index, kLastColumn); - beginInsertRows(QModelIndex(), 0, count - 1); + beginInsertRows(QModelIndex(), 0, index); endInsertRows(); Q_EMIT dataChanged(topLeft, bottomRight);