Compare commits

...
Author SHA1 Message Date
CodemodService Bot 23fb972a06 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] [A]
Reviewed By: rshest

Differential Revision: D80617203
2025-08-21 02:22:56 -07:00
2 changed files with 8 additions and 8 deletions
@@ -34,10 +34,10 @@ inline Color hostPlatformColorFromComponents(ColorComponents components) {
inline ColorComponents colorComponentsFromHostPlatformColor(Color color) {
float ratio = 255;
return ColorComponents{
(float)((color >> 16) & 0xff) / ratio,
(float)((color >> 8) & 0xff) / ratio,
(float)((color >> 0) & 0xff) / ratio,
(float)((color >> 24) & 0xff) / ratio};
.red = (float)((color >> 16) & 0xff) / ratio,
.green = (float)((color >> 8) & 0xff) / ratio,
.blue = (float)((color >> 0) & 0xff) / ratio,
.alpha = (float)((color >> 24) & 0xff) / ratio};
}
inline float alphaFromHostPlatformColor(Color color) {
@@ -40,10 +40,10 @@ struct Color {
float ratio = 255;
int32_t primitiveColor = getColor();
return ColorComponents{
(float)((primitiveColor >> 16) & 0xff) / ratio,
(float)((primitiveColor >> 8) & 0xff) / ratio,
(float)((primitiveColor >> 0) & 0xff) / ratio,
(float)((primitiveColor >> 24) & 0xff) / ratio};
.red = (float)((primitiveColor >> 16) & 0xff) / ratio,
.green = (float)((primitiveColor >> 8) & 0xff) / ratio,
.blue = (float)((primitiveColor >> 0) & 0xff) / ratio,
.alpha = (float)((primitiveColor >> 24) & 0xff) / ratio};
}
bool operator==(const Color& other) const;
bool operator!=(const Color& other) const;