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
DarrenJiang13 committed Jan 19, 2024
1 parent 0325e00 commit efcaa4e
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 efcaa4e

Please sign in to comment.