mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
Use MAKE_ENUM_HASHABLE to hash SymbolKind
This commit is contained in:
parent
420e84329b
commit
d79a7a3fa1
@ -36,17 +36,7 @@ struct IndexVar;
|
||||
// front of others.
|
||||
enum class SymbolKind : uint8_t { Invalid, File, Type, Func, Var };
|
||||
MAKE_REFLECT_TYPE_PROXY(SymbolKind);
|
||||
|
||||
// FIXME: Make old compiler happy.
|
||||
namespace std {
|
||||
template <>
|
||||
struct hash<::SymbolKind> {
|
||||
size_t operator()(const ::SymbolKind& instance) const {
|
||||
using type = std::underlying_type<::SymbolKind>::type;
|
||||
return std::hash<type>()(static_cast<type>(instance));
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
MAKE_ENUM_HASHABLE(SymbolKind);
|
||||
|
||||
using RawId = uint32_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user