Skip to content

Commit 3552fc6

Browse files
authored
Merge pull request #1650 from quagla/patch-2
Add missing braces
2 parents da409c2 + 7ff2fdd commit 3552fc6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

nanovdb/nanovdb/NanoVDB.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)