@@ -258,7 +258,7 @@ class CVertexWelder {
258258 }
259259
260260 const auto & indexView = outPolygon->getIndexView ();
261- const auto remappedRangeFormat = (maxRemappedIndex - 1 ) < std::numeric_limits<uint16_t >::max () ? IGeometryBase::EAABBFormat::U16 : IGeometryBase::EAABBFormat::U32;
261+ const auto remappedRangeFormat = (maxRemappedIndex - 1 ) < static_cast < decltype (maxRemappedIndex)>( std::numeric_limits<uint16_t >::max () ) ? IGeometryBase::EAABBFormat::U16 : IGeometryBase::EAABBFormat::U32;
262262
263263 auto createRemappedIndexView = [&](size_t indexCount) {
264264 const uint32_t indexSize = remappedRangeFormat == IGeometryBase::EAABBFormat::U16 ? sizeof (uint16_t ) : sizeof (uint32_t );
@@ -302,10 +302,10 @@ class CVertexWelder {
302302 auto * remappedIndexPtr = reinterpret_cast <IndexT*>(remappedIndexView.getPointer ());
303303 for (uint32_t index_i = 0 ; index_i < polygon->getIndexCount (); index_i++)
304304 {
305- hlsl::vector<IndexT , 1 > index;
306- indexView.decodeElement <hlsl::vector<IndexT , 1 >>(index_i, index);
307- IndexT remappedIndex = remappedVertexIndexes[index.x ];
308- remappedIndexPtr[index_i] = remappedIndex ;
305+ hlsl::vector<uint32_t , 1 > index;
306+ indexView.decodeElement <hlsl::vector<uint32_t , 1 >>(index_i, index);
307+ const auto remappedIndex = remappedVertexIndexes[index.x ];
308+ remappedIndexPtr[index_i] = remappedVertexIndexes[index. x ] ;
309309 if (remappedIndex == INVALID_INDEX) return false ;
310310 }
311311 return true ;
@@ -343,7 +343,7 @@ class CVertexWelder {
343343 outPolygon->setIndexView (std::move (remappedIndexView));
344344 }
345345
346- CPolygonGeometryManipulator::recomputeContentHashes (outPolygon. get ());
346+ CGeometryManipulator::recomputeContentHash (outPolygon-> getIndexView ());
347347 return outPolygon;
348348 }
349349};
0 commit comments