Current snippet (note: kInvalidOrMissingColor = std::numeric_limits<uint32_t>::max() + 1):
std::string ColorToString(int64_t color) {
if (color == blink::Manifest::kInvalidOrMissingColor)
return std::string();
return color_utils::SkColorToRgbaString(reinterpret_cast<uint32_t&>(color));
}
We should probably just use static_cast<> here.
Also, since we're treating the color as a bitfield, it should probably just be defined as a uint64_t.
Comment 1 by dcheng@chromium.org
, Apr 25 2018