Skip to content

Commit

Permalink
replace erase() with clear() to make imported keylist deconstruction …
Browse files Browse the repository at this point in the history
…faster
  • Loading branch information
jiangyujie.jyj authored and DarrenJiang13 committed Nov 5, 2023
1 parent 0325e00 commit fee7875
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions obj_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,10 @@ imported_keylist::imported_keylist(const char *filename)

imported_keylist::~imported_keylist()
{
while (!m_keys.empty()) {
free(m_keys.front());
m_keys.erase(m_keys.begin());
for (unsigned int i = 0; i < m_keys.size(); i++) {
free(m_keys[i]);
}
m_keys.clear();
}

bool imported_keylist::read_keys(void)
Expand Down

0 comments on commit fee7875

Please sign in to comment.