Skip to content

Commit

Permalink
New code style using iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Jun 28, 2023
1 parent 227e3d4 commit a5cf33a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/style/Schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,13 @@ namespace lsp

// Destroy named styles
vBuiltin.flush();
lltl::parray<Style> vs;
vStyles.values(&vs);
vStyles.flush();
for (size_t i=0, n=vs.size(); i<n; ++i)
for (lltl::iterator<Style> it = vStyles.values(); it; ++it)
{
Style *s = vs.uget(i);
Style *s = *it;
if (s != NULL)
delete s;
}
vStyles.flush();

// Destroy root style
if (pRoot != NULL)
Expand Down

0 comments on commit a5cf33a

Please sign in to comment.