From accb8c56995ff003e5b6c056a020a2e5f32d0ebd Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 4 Jul 2023 01:17:11 +0900 Subject: [PATCH] svg loader: --compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../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) { --- src/loaders/svg/tvgSvgLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loaders/svg/tvgSvgLoader.cpp b/src/loaders/svg/tvgSvgLoader.cpp index fd3b4f92..631940da 100644 --- a/src/loaders/svg/tvgSvgLoader.cpp +++ b/src/loaders/svg/tvgSvgLoader.cpp @@ -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;