fix(frontends/lean/server): std::unordered_map::insert does replace
existing entry, fixes #188
This commit is contained in:
parent
b7023ce1d8
commit
6db46e0505
1 changed files with 3 additions and 0 deletions
|
@ -324,10 +324,13 @@ void server::load_file(std::string const & fname, bool error_if_nofile) {
|
|||
m_out << "-- ERROR failed to open file '" << fname << "'" << std::endl;
|
||||
} else {
|
||||
m_file.reset(new file(in, fname));
|
||||
m_file_map.erase(fname);
|
||||
m_file_map.insert(mk_pair(fname, m_file));
|
||||
}
|
||||
} else {
|
||||
m_cache.clear();
|
||||
m_file.reset(new file(in, fname));
|
||||
m_file_map.erase(fname);
|
||||
m_file_map.insert(mk_pair(fname, m_file));
|
||||
process_from(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue