Skip to content

Commit

Permalink
[qmlSfmData] PointCloudEntity: Use reinterpret_cast instead of C-casts
Browse files Browse the repository at this point in the history
  • Loading branch information
cbentejac committed Oct 26, 2023
1 parent 62a7565 commit 3993cca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qmlSfmData/PointCloudEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void PointCloudEntity::setData(const aliceVision::sfmData::Landmarks & landmarks
int npoints = static_cast<int>(landmarks.size());

// vertices buffer
QByteArray positionData((const char*)points.data(), npoints * 3 * static_cast<int>(sizeof(float)));
QByteArray positionData(reinterpret_cast<const char*>(points.data()), npoints * 3 * static_cast<int>(sizeof(float)));
auto vertexDataBuffer = new QBuffer;
vertexDataBuffer->setData(positionData);
auto positionAttribute = new QAttribute;
Expand All @@ -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<int>(sizeof(float)));
QByteArray colorData(reinterpret_cast<const char*>(colors.data()), npoints * 3 * static_cast<int>(sizeof(float)));
colorDataBuffer->setData(colorData);

// colors buffer
Expand Down

0 comments on commit 3993cca

Please sign in to comment.