summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index 7f20dee95..9a73b9eca 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -800,7 +800,7 @@ void Layout::fitToPathAlign(SVGLength const &startOffset, Path const &path)
SPCurve *Layout::convertToCurves(iterator const &from_glyph, iterator const &to_glyph) const
{
- GSList *cc = NULL;
+ std::list<SPCurve *> cc;
for (int glyph_index = from_glyph._glyph_index ; glyph_index < to_glyph._glyph_index ; glyph_index++) {
Geom::Affine glyph_matrix;
@@ -811,22 +811,14 @@ SPCurve *Layout::convertToCurves(iterator const &from_glyph, iterator const &to_
if (pathv) {
Geom::PathVector pathv_trans = (*pathv) * glyph_matrix;
SPCurve *c = new SPCurve(pathv_trans);
- if (c) cc = g_slist_prepend(cc, c);
+ if (c) cc.push_back(c);
}
}
- cc = g_slist_reverse(cc);
+ SPCurve *curve = new SPCurve(cc);
- SPCurve *curve;
- if ( cc ) {
- curve = SPCurve::concat(cc);
- } else {
- curve = new SPCurve();
- }
-
- while (cc) {
+ for (auto i:cc) {
/* fixme: This is dangerous, as we are mixing art_alloc and g_new */
- reinterpret_cast<SPCurve *>(cc->data)->unref();
- cc = g_slist_remove(cc, cc->data);
+ i->unref();
}
return curve;