AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

Addresses warning in vdb point: integer conversion resulted in truncation #1597

Closed apradhana closed 1 year ago

apradhana commented 1 year ago

I'm submitting this PR on behalf of a collegaue, C. Horvath. He reported a warning/error for VS2022: C:\Users\chorvath\.conan\data\openvdb\10.0.0\blackencino\latest\package\f3f00aaf06c8145a4df169b78bec8a0b1e526438\include\openvdb\points\AttributeSet.h(41): warning #69-D: integer conversion resulted in truncation Because in the absence of an integer base type the enum INVALID_POS defaults to an int, the truncation becomes a negative number. He proposed this solution. Another solution will be to make INVALID_POS to be a static constexpr size_t.