summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 15:49:26 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 15:49:26 +0000
commite0957537cd0938313803c290a2f3922a3889e6f1 (patch)
tree7f158d00a7655ee91ac094f676f6b3bd624a78b7 /src/libnrtype
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-e0957537cd0938313803c290a2f3922a3889e6f1.tar.gz
inkscape-e0957537cd0938313803c290a2f3922a3889e6f1.zip
Removed all GSList occurences in .h files
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;