colour: use view::consume with unsigned types

This commit is contained in:
Danny Robson 2019-01-20 17:57:18 +11:00
parent 0349d24473
commit abb9d4c3aa

View File

@ -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 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> ();
}