src: Improved code view performance

* fixed slow annotation hovering
* improved retrieving source locations for whole files
This commit is contained in:
Eberhard Graether
2017-07-13 02:25:54 +02:00
parent 997f952b86
commit da756c9a4c
3 changed files with 19 additions and 10 deletions
+12 -3
View File
@@ -93,9 +93,18 @@ namespace utility
template<typename T>
bool shareElement(const std::set<T>& a, const std::set<T>& b)
{
std::set<T> c(a.begin(), a.end());
c.insert(b.begin(), b.end());
return a.size() + b.size() != c.size();
const std::set<T>* aPtr = a.size() > b.size() ? &a : &b;
const std::set<T>* bPtr = aPtr == &a ? &b : &a;
for (const T& bt : *bPtr)
{
if (aPtr->find(bt) != aPtr->end())
{
return true;
}
}
return false;
}
ApplicationArchitectureType getApplicationArchitectureType();