From 3993cca30718ae698fa9a077e1680ded87718e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 26 Oct 2023 17:47:39 +0200 Subject: [PATCH] [qmlSfmData] PointCloudEntity: Use `reinterpret_cast` instead of C-casts --- src/qmlSfmData/PointCloudEntity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qmlSfmData/PointCloudEntity.cpp b/src/qmlSfmData/PointCloudEntity.cpp index 9266f8bf..828c2900 100644 --- a/src/qmlSfmData/PointCloudEntity.cpp +++ b/src/qmlSfmData/PointCloudEntity.cpp @@ -37,7 +37,7 @@ void PointCloudEntity::setData(const aliceVision::sfmData::Landmarks & landmarks int npoints = static_cast(landmarks.size()); // vertices buffer - QByteArray positionData((const char*)points.data(), npoints * 3 * static_cast(sizeof(float))); + QByteArray positionData(reinterpret_cast(points.data()), npoints * 3 * static_cast(sizeof(float))); auto vertexDataBuffer = new QBuffer; vertexDataBuffer->setData(positionData); auto positionAttribute = new QAttribute; @@ -54,7 +54,7 @@ void PointCloudEntity::setData(const aliceVision::sfmData::Landmarks & landmarks // read color data auto colorDataBuffer = new QBuffer; - QByteArray colorData((const char*)colors.data(), npoints * 3 * static_cast(sizeof(float))); + QByteArray colorData(reinterpret_cast(colors.data()), npoints * 3 * static_cast(sizeof(float))); colorDataBuffer->setData(colorData); // colors buffer