Skip to content

Commit

Permalink
fbsource//xplat/graphics/igl/public/src/igl [B] [B] [B]
Browse files Browse the repository at this point in the history
Reviewed By: nlutsenko

Differential Revision: D67289393

fbshipit-source-id: 549275ee8c7fc556ace142c219e92cb46f90abd1
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Dec 17, 2024
1 parent da4d65e commit 18b9f51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/igl/tests/util/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ glm::vec<L, T, Q> convertLinearToSRGB(const glm::vec<L, T, Q>& linearColor,
* compressed using the sRGB transfer function and the alpha is linear.
*/
struct sRGBColor {
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
uint8_t r{};
uint8_t g{};
uint8_t b{};
uint8_t a{};

/**
* @brief Constructor ingesting red, green, blue. alpha is assumed to be 255.
Expand Down Expand Up @@ -80,7 +80,7 @@ struct sRGBColor {
* @remark the red green and blue are assumed to be gamma compressed using the sRGB transfer
* function and the alpha is linear.
*/
constexpr uint32_t toRGBA32() const {
[[nodiscard]] constexpr uint32_t toRGBA32() const {
return (r << 24) | (g << 16) | (b << 8) | a;
}

Expand Down

0 comments on commit 18b9f51

Please sign in to comment.