Skip to content

Commit 33d31c9

Browse files
committed
Switch from deprecated elsize to itemsize
1 parent 0fcf6c9 commit 33d31c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/ply_loader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pybind11::array ply_data_to_array(std::shared_ptr<tinyply::PlyData> attrib) {
7474
if (attrib->count == 0) {
7575
return pybind11::array(attrib_dtype, std::vector<size_t>({0, 0}));
7676
}
77-
size_t bytes_per_scalar = attrib_dtype.elsize();
77+
size_t bytes_per_scalar = static_cast<size_t>(attrib_dtype.itemsize());
7878
if (bytes_per_scalar <= 0) {
7979
throw std::runtime_error("Internal PLY loading error. Type has no defined byte size.");
8080
}
@@ -541,4 +541,4 @@ void save_mesh_ply(std::string filename,
541541
plyf.write(outstream_binary, true);
542542
}
543543

544-
#endif // PLY_LOADER_H
544+
#endif // PLY_LOADER_H

0 commit comments

Comments
 (0)