@@ -569,14 +569,14 @@ class Rgba8
569569 Rgba8 (Rgba8&&) = default ;
570570 Rgba8& operator =(Rgba8&&) = default ;
571571 Rgba8& operator =(const Rgba8&) = default ;
572- __hostdev__ Rgba8 () : mData{0 ,0 ,0 ,0 } {static_assert (sizeof (uint32_t ) == sizeof (Rgba8)," Unexpected sizeof" );}
573- __hostdev__ Rgba8 (uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255u ) : mData{r, g, b, a} {}
572+ __hostdev__ Rgba8 () : mData{{ 0 ,0 ,0 ,0 } } {static_assert (sizeof (uint32_t ) == sizeof (Rgba8)," Unexpected sizeof" );}
573+ __hostdev__ Rgba8 (uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255u ) : mData{{ r, g, b, a} } {}
574574 explicit __hostdev__ Rgba8 (uint8_t v) : Rgba8(v,v,v,v) {}
575575 __hostdev__ Rgba8 (float r, float g, float b, float a = 1 .0f )
576- : mData{(uint8_t (0 .5f + r * 255 .0f )),// round to nearest
577- (uint8_t (0 .5f + g * 255 .0f )),// round to nearest
578- (uint8_t (0 .5f + b * 255 .0f )),// round to nearest
579- (uint8_t (0 .5f + a * 255 .0f ))}// round to nearest
576+ : mData{{ (uint8_t (0 .5f + r * 255 .0f )), // round to nearest
577+ (uint8_t (0 .5f + g * 255 .0f )), // round to nearest
578+ (uint8_t (0 .5f + b * 255 .0f )), // round to nearest
579+ (uint8_t (0 .5f + a * 255 .0f ))} }// round to nearest
580580 {
581581 }
582582 __hostdev__ bool operator <(const Rgba8& rhs) const { return mData .packed < rhs.mData .packed ; }
0 commit comments