Skip to content

Commit

Permalink
satisfy window CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemann16 committed Feb 1, 2021
1 parent f6f01af commit 749d6d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/draco/io/DracoReader.cpp
Expand Up @@ -242,7 +242,7 @@ point_count_t DracoReader::read(PointViewPtr view, point_count_t count)
{
for (auto& dim: m_dimensions)
{
const uint8_t *src = dim.attr->GetAddressOfMappedIndex(draco::PointIndex(numRead)) +
const uint8_t *src = dim.attr->GetAddressOfMappedIndex(draco::PointIndex((uint32_t)numRead)) +
draco::DataTypeLength(dim.attr->data_type()) * dim.attNum;
view->setField(dim.pdalId, dim.pdalType, id, src);
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/draco/io/DracoWriter.cpp
Expand Up @@ -332,17 +332,17 @@ void DracoWriter::initPointCloud(point_count_t size)

void DracoWriter::addPoint(DimensionInfo dim, PointRef &point, PointId idx)
{
const auto pointId = draco::PointIndex(idx);
const auto pointId = draco::PointIndex((uint32_t)idx);

//find data type and create buffer
Dimension::Type dataType = dim.pdalDims[0].m_type;
size_t size = Dimension::size(dataType) * dim.pdalDims.size();
char buffer [size];
std::vector<char> buffer(size, 0);
//fill buffer
point.getPackedData(dim.pdalDims, buffer);
point.getPackedData(dim.pdalDims, buffer.data());
//add to draco pointcloud
draco::PointAttribute *const att = m_pc->attribute(dim.attId);
att->SetAttributeValue(att->mapped_index(pointId), &buffer);
att->SetAttributeValue(att->mapped_index(pointId), buffer.data());
}

void DracoWriter::write(const PointViewPtr view)
Expand Down

0 comments on commit 749d6d8

Please sign in to comment.