mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-18 06:31:15 +00:00
Formatting and a TODO
This commit is contained in:
parent
eea8a1b07a
commit
6a50c48aaa
@ -124,6 +124,8 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto cleanup_maybe_relative_path = [&](const std::string& path) {
|
auto cleanup_maybe_relative_path = [&](const std::string& path) {
|
||||||
|
// TODO/FIXME: Normalization will fail for paths that do not exist. Should
|
||||||
|
// it return an optional<std::string>?
|
||||||
assert(!path.empty());
|
assert(!path.empty());
|
||||||
if (path[0] == '/' || entry.directory.empty())
|
if (path[0] == '/' || entry.directory.empty())
|
||||||
return NormalizePathWithTestOptOut(path);
|
return NormalizePathWithTestOptOut(path);
|
||||||
|
@ -55,13 +55,13 @@ enum class SymbolKind : int { Invalid, File, Type, Func, Var };
|
|||||||
MAKE_REFLECT_TYPE_PROXY(SymbolKind, int);
|
MAKE_REFLECT_TYPE_PROXY(SymbolKind, int);
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template <> struct hash<::SymbolKind> {
|
template <>
|
||||||
|
struct hash<::SymbolKind> {
|
||||||
size_t operator()(const ::SymbolKind& instance) const {
|
size_t operator()(const ::SymbolKind& instance) const {
|
||||||
return std::hash<int>()(static_cast<int>(instance));
|
return std::hash<int>()(static_cast<int>(instance));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace std
|
||||||
|
|
||||||
|
|
||||||
struct SymbolIdx {
|
struct SymbolIdx {
|
||||||
SymbolKind kind;
|
SymbolKind kind;
|
||||||
|
Loading…
Reference in New Issue
Block a user