svg loader: --compiler warnings

../src/loaders/svg/tvgSvgLoader.cpp: In function ‘void _copyAttr(SvgNode*, const SvgNode*)’:
../src/loaders/svg/tvgSvgLoader.cpp:2911:44: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 2911 |             if (to->node.polygon.pts.count = from->node.polygon.pts.count) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/loaders/svg/tvgSvgLoader.cpp:2917:45: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 2917 |             if (to->node.polyline.pts.count = from->node.polyline.pts.count) {
This commit is contained in:
Hermet Park 2023-07-04 01:17:11 +09:00
parent d72d6aa51f
commit accb8c5699

View file

@ -2908,13 +2908,13 @@ static void _copyAttr(SvgNode* to, const SvgNode* from)
break;
}
case SvgNodeType::Polygon: {
if (to->node.polygon.pts.count = from->node.polygon.pts.count) {
if ((to->node.polygon.pts.count = from->node.polygon.pts.count)) {
to->node.polygon.pts = from->node.polygon.pts;
}
break;
}
case SvgNodeType::Polyline: {
if (to->node.polyline.pts.count = from->node.polyline.pts.count) {
if ((to->node.polyline.pts.count = from->node.polyline.pts.count)) {
to->node.polyline.pts = from->node.polyline.pts;
}
break;