fix(color): Rename type() function to get_type
In gcc5, this caused compilation errors because the type enum has the same name.
This commit is contained in:
parent
cf2653c8bd
commit
3f03b671bb
@ -22,7 +22,7 @@ class rgba {
|
|||||||
bool operator==(const rgba& other) const;
|
bool operator==(const rgba& other) const;
|
||||||
|
|
||||||
uint32_t value() const;
|
uint32_t value() const;
|
||||||
type type() const;
|
type get_type() const;
|
||||||
|
|
||||||
double alpha_d() const;
|
double alpha_d() const;
|
||||||
double red_d() const;
|
double red_d() const;
|
||||||
|
@ -106,7 +106,7 @@ uint32_t rgba::value() const {
|
|||||||
return this->m_value;
|
return this->m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum rgba::type rgba::type() const {
|
enum rgba::type rgba::get_type() const {
|
||||||
return m_type;
|
return m_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ TEST(Rgba, constructor) {
|
|||||||
EXPECT_FALSE(rgba("#-abc").has_color());
|
EXPECT_FALSE(rgba("#-abc").has_color());
|
||||||
EXPECT_FALSE(rgba("#xyz").has_color());
|
EXPECT_FALSE(rgba("#xyz").has_color());
|
||||||
|
|
||||||
EXPECT_EQ(rgba::type::ALPHA_ONLY, rgba{"#12"}.type());
|
EXPECT_EQ(rgba::type::ALPHA_ONLY, rgba{"#12"}.get_type());
|
||||||
|
|
||||||
EXPECT_EQ(0xff000000, rgba{"#ff"}.value());
|
EXPECT_EQ(0xff000000, rgba{"#ff"}.value());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user