forked from OSchip/llvm-project
Replace const_iterator with iterator to build against libstdc++
- libstdc++ defines vector::erase(iterator) but not vector::erase(const_iterator) llvm-svn: 167764
This commit is contained in:
parent
0cc8bc4d63
commit
33c20f45f1
|
@ -318,14 +318,14 @@ public:
|
|||
{
|
||||
size_t num_removed = 0;
|
||||
Entry search_entry (unique_cstr);
|
||||
const_iterator end = m_map.end();
|
||||
const_iterator begin = m_map.begin();
|
||||
const_iterator lower_pos = std::lower_bound (begin, end, search_entry);
|
||||
iterator end = m_map.end();
|
||||
iterator begin = m_map.begin();
|
||||
iterator lower_pos = std::lower_bound (begin, end, search_entry);
|
||||
if (lower_pos != end)
|
||||
{
|
||||
if (lower_pos->cstring == unique_cstr)
|
||||
{
|
||||
const_iterator upper_pos = std::upper_bound (lower_pos, end, search_entry);
|
||||
iterator upper_pos = std::upper_bound (lower_pos, end, search_entry);
|
||||
if (lower_pos == upper_pos)
|
||||
{
|
||||
m_map.erase (lower_pos);
|
||||
|
|
Loading…
Reference in New Issue