mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-28 17:15:57 +00:00
svg_loader: remove unnecessary variables
This commit is contained in:
parent
482add35e9
commit
1799cd9a78
1 changed files with 3 additions and 8 deletions
|
@ -2694,11 +2694,7 @@ static void _svgLoaderParserXmlStyle(SvgLoaderData* loader, const char* content,
|
||||||
GradientFactoryMethod gradientMethod;
|
GradientFactoryMethod gradientMethod;
|
||||||
SvgNode *node = nullptr;
|
SvgNode *node = nullptr;
|
||||||
|
|
||||||
const char *buf = content;
|
while (auto next = simpleXmlParseCSSAttribute(content, length, &tag, &name, &attrs, &attrsLength)) {
|
||||||
unsigned buflen = length;
|
|
||||||
|
|
||||||
|
|
||||||
while (auto next = simpleXmlParseCSSAttribute(buf, buflen, &tag, &name, &attrs, &attrsLength)) {
|
|
||||||
if ((method = _findGroupFactory(tag))) {
|
if ((method = _findGroupFactory(tag))) {
|
||||||
//TODO - node->id ??? add additional var for svgnode?
|
//TODO - node->id ??? add additional var for svgnode?
|
||||||
if ((node = method(loader, loader->cssStyle, attrs, attrsLength, simpleXmlParseW3CAttribute))) node->id = _copyId(name);
|
if ((node = method(loader, loader->cssStyle, attrs, attrsLength, simpleXmlParseW3CAttribute))) node->id = _copyId(name);
|
||||||
|
@ -2714,9 +2710,8 @@ static void _svgLoaderParserXmlStyle(SvgLoaderData* loader, const char* content,
|
||||||
TVGLOG("SVG", "Unsupported elements used [Elements: %s]", tag);
|
TVGLOG("SVG", "Unsupported elements used [Elements: %s]", tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
buflen -= next - buf;
|
length -= next - content;
|
||||||
buf = next;
|
content = next;
|
||||||
|
|
||||||
|
|
||||||
free(tag);
|
free(tag);
|
||||||
free(name);
|
free(name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue