colour: use view::consume with unsigned types
This commit is contained in:
parent
0349d24473
commit
abb9d4c3aa
@ -36,7 +36,7 @@ parse_hex (cruft::view<const char*> &str)
|
|||||||
uint8_t g = cruft::ascii::from_hex (str[3]) << 4u | cruft::ascii::from_hex (str[4]);
|
uint8_t g = cruft::ascii::from_hex (str[3]) << 4u | cruft::ascii::from_hex (str[4]);
|
||||||
uint8_t b = cruft::ascii::from_hex (str[5]) << 4u | cruft::ascii::from_hex (str[6]);
|
uint8_t b = cruft::ascii::from_hex (str[5]) << 4u | cruft::ascii::from_hex (str[6]);
|
||||||
|
|
||||||
str = str.consume (7);
|
str = str.consume (7u);
|
||||||
return cruft::srgba<4,uint8_t> { r, g, b, 255 }.template cast<float> ();
|
return cruft::srgba<4,uint8_t> { r, g, b, 255 }.template cast<float> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user