svg_loader: Remove unnecessary code

This commit is contained in:
JunsuChoi 2022-08-30 10:54:20 +09:00 committed by Mira Grudzinska
parent eb936d1a81
commit b24e7c7402

View file

@ -1909,8 +1909,6 @@ static void _styleInherit(SvgStyleProperty* child, const SvgStyleProperty* paren
if (parent->stroke.paint.url) { if (parent->stroke.paint.url) {
if (child->stroke.paint.url) free(child->stroke.paint.url); if (child->stroke.paint.url) free(child->stroke.paint.url);
child->stroke.paint.url = _copyId(parent->stroke.paint.url); child->stroke.paint.url = _copyId(parent->stroke.paint.url);
} else {
child->stroke.paint.url = nullptr;
} }
} }
if (!((int)child->stroke.flags & (int)SvgStrokeFlags::Opacity)) { if (!((int)child->stroke.flags & (int)SvgStrokeFlags::Opacity)) {
@ -1971,8 +1969,6 @@ static void _styleCopy(SvgStyleProperty* to, const SvgStyleProperty* from)
if (from->stroke.paint.url) { if (from->stroke.paint.url) {
if (to->stroke.paint.url) free(to->stroke.paint.url); if (to->stroke.paint.url) free(to->stroke.paint.url);
to->stroke.paint.url = _copyId(from->stroke.paint.url); to->stroke.paint.url = _copyId(from->stroke.paint.url);
} else {
to->stroke.paint.url = nullptr;
} }
} }
if (((int)from->stroke.flags & (int)SvgStrokeFlags::Opacity)) { if (((int)from->stroke.flags & (int)SvgStrokeFlags::Opacity)) {