diff --git a/lib/yoga/src/main/cpp/yoga/BitUtils.h b/lib/yoga/src/main/cpp/yoga/BitUtils.h index 1c32e9ecc35..2161effc7bb 100644 --- a/lib/yoga/src/main/cpp/yoga/BitUtils.h +++ b/lib/yoga/src/main/cpp/yoga/BitUtils.h @@ -45,8 +45,9 @@ void setEnumData(uint32_t& flags, size_t index, int newValue) { template void setEnumData(uint8_t& flags, size_t index, int newValue) { - flags = (flags & ~mask(bitWidthFn(), index)) | - ((newValue << index) & (mask(bitWidthFn(), index))); + flags = (flags & ~static_cast(mask(bitWidthFn(), index))) | + ((newValue << index) & + (static_cast(mask(bitWidthFn(), index)))); } constexpr bool getBooleanData(int flags, size_t index) {