mirror of
https://github.com/openharmony/third_party_meshoptimizer.git
synced 2026-07-19 20:03:59 -04:00
gltfpack: Validate areMaterialsEqual correctness via a self check
This improves coverage and will hopefully make sure areMaterialsEqual doesn't have obvious validity bugs where eg we compare two different fields accidentally.
This commit is contained in:
@@ -355,6 +355,8 @@ void mergeMeshMaterials(cgltf_data* data, std::vector<Mesh>& meshes, const Setti
|
||||
if (settings.keep_materials && data->materials[i].name && *data->materials[i].name)
|
||||
continue;
|
||||
|
||||
assert(areMaterialsEqual(data->materials[i], data->materials[i], settings));
|
||||
|
||||
for (size_t j = 0; j < i; ++j)
|
||||
{
|
||||
if (settings.keep_materials && data->materials[j].name && *data->materials[j].name)
|
||||
|
||||
Reference in New Issue
Block a user