logic: search bar duplicates
* When a location is clicked in the code that has more than one TokenLocations pointing to the same element, only one instance of the element is displayed in the search bar.
This commit is contained in:
@@ -33,6 +33,9 @@ namespace utility
|
||||
template<typename T>
|
||||
std::vector<T> toVector(const std::deque<T>& d);
|
||||
|
||||
template<typename T>
|
||||
std::vector<T> toVector(const std::set<T>& d);
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::string> toStrings(const std::vector<T>& d);
|
||||
|
||||
@@ -81,6 +84,14 @@ std::vector<T> utility::toVector(const std::deque<T>& d)
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<T> utility::toVector(const std::set<T>& d)
|
||||
{
|
||||
std::vector<T> v;
|
||||
v.insert(v.begin(), d.begin(), d.end());
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::vector<std::string> utility::toStrings(const std::vector<T>& d)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user