Browse Source

Fixed C++20 ambiguous operator overload warning

pipelines/1486128344
Shivang Gangadia 1 year ago
parent
commit
ffdf01c1ab
  1. 2
      src/usages_clang.cpp
  2. 2
      src/usages_clang.hpp

2
src/usages_clang.cpp

@ -27,7 +27,7 @@ std::map<boost::filesystem::path, Usages::Clang::Cache> Usages::Clang::caches;
Mutex Usages::Clang::caches_mutex;
std::atomic<size_t> Usages::Clang::cache_in_progress_count(0);
bool Usages::Clang::Cache::Cursor::operator==(const Cursor &o) {
bool Usages::Clang::Cache::Cursor::operator==(const Cursor &o) const {
for(auto &usr : usrs) {
if(clangmm::Cursor::is_similar_kind(o.kind, kind) && o.usrs.count(usr))
return true;

2
src/usages_clang.hpp

@ -64,7 +64,7 @@ namespace Usages {
clangmm::Cursor::Kind kind;
std::unordered_set<std::string> usrs;
bool operator==(const Cursor &o);
bool operator==(const Cursor &o) const;
};
class Token {

Loading…
Cancel
Save