guybrush77 / rapidobj

A fast, header-only, C++17 library for parsing Wavefront .obj files.
MIT License
159 stars 14 forks source link

Warnings on indices types #25

Open ahoarau opened 1 month ago

ahoarau commented 1 month ago

Hello, Is there any reason why the Indices fields are int and not std::size_t like in the Array class ?

struct Index final {
    int position_index;
    int texcoord_index;
    int normal_index;
};

Wouldn't std::size_t be preferable in that case ?

struct Index final {
    std::size_t position_index{};
    std::size_t texcoord_index{};
    std::size_t normal_index{};
};