ddiakopoulos / tinyply

:earth_africa: C++11 ply 3d mesh format importer & exporter
598 stars 118 forks source link

Use std::vector<uint8_t> instead of Buffer class #28

Closed SunBlack closed 4 years ago

SunBlack commented 5 years ago

Currently I don't see any reasons why tinyply is using a Buffer class, which looks equal to a normal std::vector. So Buffer buffer; in struct PlyData could be replaced by std::vector<uint8_t> buffer; or std::unique_ptr<std::vector<uint8_t>> buffer;

ddiakopoulos commented 4 years ago

Since this comment from 2018, the library has gone through several rewrites and the Buffer class is presently used to wrap a byte vector with information about stride, or with an assistant buffer that describes the number of variable length elements.