mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
Fix std::hash overload on g++ 6
Fixes a build error introduced in 6eab9275d0.
This commit is contained in:
@@ -70,14 +70,16 @@ struct highlight_spec_t {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace std {
|
||||||
template <>
|
template <>
|
||||||
struct std::hash<highlight_spec_t> {
|
struct hash<highlight_spec_t> {
|
||||||
std::size_t operator()(const highlight_spec_t &v) const {
|
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),
|
size_t vals[4] = {static_cast<uint32_t>(v.foreground), static_cast<uint32_t>(v.background),
|
||||||
v.valid_path, v.force_underline};
|
v.valid_path, v.force_underline};
|
||||||
return (vals[0] << 0) + (vals[1] << 6) + (vals[2] << 12) + (vals[3] << 18);
|
return (vals[0] << 0) + (vals[1] << 6) + (vals[2] << 12) + (vals[3] << 18);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
class history_item_t;
|
class history_item_t;
|
||||||
class operation_context_t;
|
class operation_context_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user