@@ -32,15 +32,15 @@ class CVertexWelder {
3232 {
3333 private:
3434
35- static bool isIntegralElementEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2)
35+ static inline bool isIntegralElementEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2)
3636 {
3737 const auto byteSize = getTexelOrBlockBytesize (view.composed .format );
3838 const auto * basePtr = reinterpret_cast <const std::byte*>(view.getPointer ());
3939 const auto stride = view.composed .stride ;
4040 return (memcmp (basePtr + (index1 * stride), basePtr + (index2 * stride), byteSize) == 0 );
4141 }
4242
43- static bool isRealElementEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2, uint32_t channelCount, float epsilon)
43+ static inline bool isRealElementEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2, uint32_t channelCount, float epsilon)
4444 {
4545 // TODO: Handle 16,32,64 bit float vectors once the pixel encode/decode functions get reimplemented in HLSL and decodeElement can actually benefit from that.
4646 hlsl::float64_t4 val1, val2;
@@ -54,7 +54,7 @@ class CVertexWelder {
5454 return true ;
5555 }
5656
57- static bool isAttributeValEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2, float epsilon)
57+ static inline bool isAttributeValEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2, float epsilon)
5858 {
5959 if (!view) return true ;
6060 const auto channelCount = getFormatChannelCount (view.composed .format );
@@ -77,7 +77,7 @@ class CVertexWelder {
7777 return true ;
7878 }
7979
80- static bool isAttributeDirEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2, float epsilon)
80+ static inline bool isAttributeDirEqual (const ICPUPolygonGeometry::SDataView& view, uint32_t index1, uint32_t index2, float epsilon)
8181 {
8282 if (!view) return true ;
8383 const auto channelCount = getFormatChannelCount (view.composed .format );
@@ -109,12 +109,12 @@ class CVertexWelder {
109109
110110 DefaultWeldPredicate (float epsilon) : m_epsilon(epsilon) {}
111111
112- bool init (const ICPUPolygonGeometry* polygon) override
112+ inline bool init (const ICPUPolygonGeometry* polygon) override
113113 {
114114 return polygon->valid ();
115115 }
116116
117- bool operator ()(const ICPUPolygonGeometry* polygon, uint32_t index1, uint32_t index2) const override
117+ inline bool operator ()(const ICPUPolygonGeometry* polygon, uint32_t index1, uint32_t index2) const override
118118 {
119119 if (!isAttributeValEqual (polygon->getPositionView (), index1, index2, m_epsilon))
120120 return false ;
@@ -136,7 +136,7 @@ class CVertexWelder {
136136 };
137137
138138 template <VertexWelderAccelerationStructure AccelStructureT>
139- static core::smart_refctd_ptr<ICPUPolygonGeometry> weldVertices (const ICPUPolygonGeometry* polygon, const AccelStructureT& as, const WeldPredicate& shouldWeldFn) {
139+ static inline core::smart_refctd_ptr<ICPUPolygonGeometry> weldVertices (const ICPUPolygonGeometry* polygon, const AccelStructureT& as, const WeldPredicate& shouldWeldFn) {
140140 auto outPolygon = core::move_and_static_cast<ICPUPolygonGeometry>(polygon->clone (0u ));
141141
142142 const auto & positionView = polygon->getPositionView ();
0 commit comments