fix(frontends/lean/info_manager): add missing method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
99e77db8ad
commit
d1c645977d
1 changed files with 12 additions and 1 deletions
|
@ -132,7 +132,18 @@ void info_manager::append(std::vector<std::unique_ptr<info_data>> && vs, bool re
|
|||
}
|
||||
}
|
||||
|
||||
void info_manager::append(std::vector<type_info_data> & v, bool remove_duplicates) {
|
||||
void info_manager::append(std::vector<type_info_data> & vs, bool remove_duplicates) {
|
||||
lock_guard<mutex> lc(m_mutex);
|
||||
std::stable_sort(vs.begin(), vs.end());
|
||||
type_info_data prev;
|
||||
bool first = true;
|
||||
for (auto & v : vs) {
|
||||
if (!remove_duplicates || first || !v.eq_pos(prev.get_line(), prev.get_column())) {
|
||||
prev = v;
|
||||
add_core(std::unique_ptr<info_data>(new type_info_data(v)));
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void info_manager::sort() {
|
||||
|
|
Loading…
Reference in a new issue