The float->int cast in read_integer is unreachable as this function is only called from read_float, and it handles r_32f separately.
The float->int cast in read_index is reachable since the caller may call accessor_read_index or unpack_indices on a floating-point buffer. However, there should be no valid circumstances to do this as cases when glTF buffers carry index data (geometry indices, sparse accessors) require unnormalized integers by the spec. This is also underscored by read_index only handling unsigned integer types.
Based on the discussion in #227 the support for float->int cast is somewhat accidental and is unlikely to be required by existing users.
The float->int cast in read_integer is unreachable as this function is only called from read_float, and it handles r_32f separately.
The float->int cast in read_index is reachable since the caller may call accessor_read_index or unpack_indices on a floating-point buffer. However, there should be no valid circumstances to do this as cases when glTF buffers carry index data (geometry indices, sparse accessors) require unnormalized integers by the spec. This is also underscored by read_index only handling unsigned integer types.
Based on the discussion in #227 the support for float->int cast is somewhat accidental and is unlikely to be required by existing users.