From: Michal Maciola <71131832+mmaciola@users.noreply.github.com> Date: Thu, 22 Jul 2021 11:35:26 +0000 (+0200) Subject: common: style fixes (#644) X-Git-Tag: accepted/tizen/unified/20210727.124506~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8235340d5929e176018c7a804be9f56087bef9a;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git common: style fixes (#644) --- diff --git a/src/lib/sw_engine/tvgSwCommon.h b/src/lib/sw_engine/tvgSwCommon.h index d3c89e3..fa3b27b 100644 --- a/src/lib/sw_engine/tvgSwCommon.h +++ b/src/lib/sw_engine/tvgSwCommon.h @@ -70,7 +70,7 @@ struct SwPoint return {x - rhs.x, y - rhs.y}; } - bool operator==(const SwPoint& rhs ) const + bool operator==(const SwPoint& rhs) const { return (x == rhs.x && y == rhs.y); } diff --git a/src/lib/sw_engine/tvgSwMath.cpp b/src/lib/sw_engine/tvgSwMath.cpp index 2787d34..e39eeb0 100644 --- a/src/lib/sw_engine/tvgSwMath.cpp +++ b/src/lib/sw_engine/tvgSwMath.cpp @@ -271,7 +271,7 @@ int64_t mathMultiply(int64_t a, int64_t b) b = -b; s = -s; } - int64_t c = (a * b + 0x8000L ) >> 16; + int64_t c = (a * b + 0x8000L) >> 16; return (s > 0) ? c : -c; } diff --git a/src/lib/sw_engine/tvgSwRaster.cpp b/src/lib/sw_engine/tvgSwRaster.cpp index 169da04..804f679 100644 --- a/src/lib/sw_engine/tvgSwRaster.cpp +++ b/src/lib/sw_engine/tvgSwRaster.cpp @@ -49,7 +49,7 @@ static uint32_t _argbJoin(uint8_t r, uint8_t g, uint8_t b, uint8_t a) static bool _inverse(const Matrix* transform, Matrix* invM) { - // computes the inverse of a matrix m + //computes the inverse of a matrix m auto det = transform->e11 * (transform->e22 * transform->e33 - transform->e32 * transform->e23) - transform->e12 * (transform->e21 * transform->e33 - transform->e23 * transform->e31) + transform->e13 * (transform->e21 * transform->e32 - transform->e22 * transform->e31); diff --git a/src/lib/sw_engine/tvgSwRle.cpp b/src/lib/sw_engine/tvgSwRle.cpp index 2d3308d..34a2133 100644 --- a/src/lib/sw_engine/tvgSwRle.cpp +++ b/src/lib/sw_engine/tvgSwRle.cpp @@ -614,7 +614,7 @@ SwSpan* _intersectSpansRegion(const SwRleData *clip, const SwRleData *targetRle, auto clipSpans = clip->spans; auto clipEnd = clip->spans + clip->size; - while (spanCnt > 0 && spans < end ) { + while (spanCnt > 0 && spans < end) { if (clipSpans == clipEnd) { spans = end; break; @@ -680,7 +680,7 @@ SwSpan* _intersectMaskRegion(const SwRleData *clip, const SwRleData *targetRle, clipSpans1++; } - while (spanCnt && spans < end ) { + while (spanCnt && spans < end) { if (clipSpans > clipEnd) { spans = end; break; @@ -737,7 +737,7 @@ SwSpan* _intersectSpansRect(const SwBBox *bbox, const SwRleData *targetRle, SwSp auto maxx = minx + static_cast(bbox->max.x - bbox->min.x) - 1; auto maxy = miny + static_cast(bbox->max.y - bbox->min.y) - 1; - while (spanCnt && spans < end ) { + while (spanCnt && spans < end) { if (spans->y > maxy) { spans = end; break; diff --git a/src/lib/tvgBezier.cpp b/src/lib/tvgBezier.cpp index c27fe79..3577ccd 100644 --- a/src/lib/tvgBezier.cpp +++ b/src/lib/tvgBezier.cpp @@ -89,8 +89,8 @@ void bezSplitLeft(Bezier& cur, float at, Bezier& left) left.ctrl1.x = cur.start.x + at * (cur.ctrl1.x - cur.start.x); left.ctrl1.y = cur.start.y + at * (cur.ctrl1.y - cur.start.y); - left.ctrl2.x = cur.ctrl1.x + at * (cur.ctrl2.x - cur.ctrl1.x); // temporary holding spot - left.ctrl2.y = cur.ctrl1.y + at * (cur.ctrl2.y - cur.ctrl1.y); // temporary holding spot + left.ctrl2.x = cur.ctrl1.x + at * (cur.ctrl2.x - cur.ctrl1.x); //temporary holding spot + left.ctrl2.y = cur.ctrl1.y + at * (cur.ctrl2.y - cur.ctrl1.y); //temporary holding spot cur.ctrl2.x = cur.ctrl2.x + at * (cur.end.x - cur.ctrl2.x); cur.ctrl2.y = cur.ctrl2.y + at * (cur.end.y - cur.ctrl2.y); diff --git a/src/loaders/png/tvgPngLoader.cpp b/src/loaders/png/tvgPngLoader.cpp index d7c71e5..5677129 100755 --- a/src/loaders/png/tvgPngLoader.cpp +++ b/src/loaders/png/tvgPngLoader.cpp @@ -69,7 +69,7 @@ bool PngLoader::read() image->format = PNG_FORMAT_BGRA; buffer = static_cast(malloc(PNG_IMAGE_SIZE((*image)))); if (!buffer) { - // out of memory, only time when libpng doesnt free its data + //out of memory, only time when libpng doesnt free its data png_image_free(image); return false; }