Skip to content

Commit 2a0abfe

Browse files
committed
Fix TextRendering.h when using dll, both new+delete happens in msdfgen module now
1 parent 32a2e79 commit 2a0abfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/nbl/ext/TextRendering/TextRendering.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class GlyphShapeBuilder {
138138
void lineTo(const float64_t2 to)
139139
{
140140
if (to != lastPosition) {
141-
currentContour->addEdge(new msdfgen::LinearSegment(msdfPoint(lastPosition), msdfPoint(to)));
141+
currentContour->addEdge(msdfgen::EdgeHolder(msdfPoint(lastPosition), msdfPoint(to)));
142142
lastPosition = to;
143143
}
144144
}
@@ -147,15 +147,15 @@ class GlyphShapeBuilder {
147147
// [last position, control, end]
148148
void quadratic(const float64_t2 control, const float64_t2 to)
149149
{
150-
currentContour->addEdge(new msdfgen::QuadraticSegment(msdfPoint(lastPosition), msdfPoint(control), msdfPoint(to)));
150+
currentContour->addEdge(msdfgen::EdgeHolder(msdfPoint(lastPosition), msdfPoint(control), msdfPoint(to)));
151151
lastPosition = to;
152152
}
153153

154154
// Continue the last moveTo or lineTo with a cubic bezier:
155155
// [last position, control1, control2, end]
156156
void cubic(const float64_t2 control1, const float64_t2 control2, const float64_t2 to)
157157
{
158-
currentContour->addEdge(new msdfgen::CubicSegment(msdfPoint(lastPosition), msdfPoint(control1), msdfPoint(control2), msdfPoint(to)));
158+
currentContour->addEdge(msdfgen::EdgeHolder(msdfPoint(lastPosition), msdfPoint(control1), msdfPoint(control2), msdfPoint(to)));
159159
lastPosition = to;
160160
}
161161

0 commit comments

Comments
 (0)