const size_t vals[4]

This commit is contained in:
Aaron Gyes
2022-04-07 09:23:42 -07:00
parent b514ec5fe6
commit 5861358238

View File

@@ -76,7 +76,7 @@ namespace std {
template <>
struct hash<highlight_spec_t> {
std::size_t operator()(const highlight_spec_t &v) const {
size_t vals[4] = {static_cast<uint32_t>(v.foreground), static_cast<uint32_t>(v.background),
const size_t vals[4] = {static_cast<uint32_t>(v.foreground), static_cast<uint32_t>(v.background),
v.valid_path, v.force_underline};
return (vals[0] << 0) + (vals[1] << 6) + (vals[2] << 12) + (vals[3] << 18);
}