mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 09:31:59 +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);
|
||||||
|
@ -603,7 +603,7 @@ IndexUpdate::IndexUpdate(const IdMap& previous_id_map,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IndexUpdate::Merge(const IndexUpdate& update) {
|
void IndexUpdate::Merge(const IndexUpdate& update) {
|
||||||
// This function runs on an indexer thread.
|
// This function runs on an indexer thread.
|
||||||
|
|
||||||
#define INDEX_UPDATE_APPEND(name) AddRange(&name, update.name);
|
#define INDEX_UPDATE_APPEND(name) AddRange(&name, update.name);
|
||||||
#define INDEX_UPDATE_MERGE(name) AddMergeableRange(&name, update.name);
|
#define INDEX_UPDATE_MERGE(name) AddMergeableRange(&name, update.name);
|
||||||
|
@ -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 <>
|
||||||
size_t operator()(const ::SymbolKind &instance) const {
|
struct hash<::SymbolKind> {
|
||||||
|
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