Skip to content

Simplify ttconv loop #938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't use iteration constructor
Apparently some compilers don't support that.
  • Loading branch information
jkseppan committed Jun 9, 2012
commit ae96cad31dbb8d2fc719ac8b9ea12a31a9c7457e
10 changes: 9 additions & 1 deletion ttconv/pprdrv_tt2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,15 @@ void GlyphToType3::PSConvert(TTStreamWriter& stream)
}

// For output, a vector is more convenient than a list.
std::vector<FlaggedPoint> points_v(points.begin(), points.end());
std::vector<FlaggedPoint> points_v;
points_v.reserve(points.size());
for (std::list<FlaggedPoint>::iterator it = points.begin();
it != points.end();
it++)
{
points_v.push_back(*it);
}

// The first point
stack(stream, 3);
PSMoveto(stream, points_v.front().x, points_v.front().y);
Expand Down