mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 11:36:25 +00:00
sw_engine: remove unnecessary assert() call
Change-Id: I8cb249b6b7f32992f7ce9c86e408546c14856330
This commit is contained in:
parent
3dc3cfd8c0
commit
8abef404cf
1 changed files with 2 additions and 9 deletions
|
@ -571,21 +571,14 @@ static void _cubicTo(RleWorker& rw, const SwPoint& ctrl1, const SwPoint& ctrl2,
|
||||||
static bool _decomposeOutline(RleWorker& rw)
|
static bool _decomposeOutline(RleWorker& rw)
|
||||||
{
|
{
|
||||||
auto outline = rw.outline;
|
auto outline = rw.outline;
|
||||||
assert(outline);
|
|
||||||
|
|
||||||
auto first = 0; //index of first point in contour
|
auto first = 0; //index of first point in contour
|
||||||
|
|
||||||
for (uint32_t n = 0; n < outline->cntrsCnt; ++n) {
|
for (uint32_t n = 0; n < outline->cntrsCnt; ++n) {
|
||||||
auto last = outline->cntrs[n];
|
auto last = outline->cntrs[n];
|
||||||
auto limit = outline->pts + last;
|
auto limit = outline->pts + last;
|
||||||
assert(limit);
|
|
||||||
|
|
||||||
auto start = UPSCALE(outline->pts[first]);
|
auto start = UPSCALE(outline->pts[first]);
|
||||||
|
|
||||||
auto pt = outline->pts + first;
|
auto pt = outline->pts + first;
|
||||||
assert(pt);
|
|
||||||
auto types = outline->types + first;
|
auto types = outline->types + first;
|
||||||
assert(types);
|
|
||||||
|
|
||||||
/* A contour cannot start with a cubic control point! */
|
/* A contour cannot start with a cubic control point! */
|
||||||
if (types[0] == SW_CURVE_TYPE_CUBIC) goto invalid_outline;
|
if (types[0] == SW_CURVE_TYPE_CUBIC) goto invalid_outline;
|
||||||
|
@ -593,8 +586,8 @@ static bool _decomposeOutline(RleWorker& rw)
|
||||||
_moveTo(rw, UPSCALE(outline->pts[first]));
|
_moveTo(rw, UPSCALE(outline->pts[first]));
|
||||||
|
|
||||||
while (pt < limit) {
|
while (pt < limit) {
|
||||||
assert(++pt);
|
++pt;
|
||||||
assert(++types);
|
++types;
|
||||||
|
|
||||||
//emit a single line_to
|
//emit a single line_to
|
||||||
if (types[0] == SW_CURVE_TYPE_POINT) {
|
if (types[0] == SW_CURVE_TYPE_POINT) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue