common: style fixes (#644)
authorMichal Maciola <71131832+mmaciola@users.noreply.github.com>
Thu, 22 Jul 2021 11:35:26 +0000 (13:35 +0200)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 23 Jul 2021 05:55:22 +0000 (14:55 +0900)
src/lib/sw_engine/tvgSwCommon.h
src/lib/sw_engine/tvgSwMath.cpp
src/lib/sw_engine/tvgSwRaster.cpp
src/lib/sw_engine/tvgSwRle.cpp
src/lib/tvgBezier.cpp
src/loaders/png/tvgPngLoader.cpp

index d3c89e3..fa3b27b 100644 (file)
@@ -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);
     }
index 2787d34..e39eeb0 100644 (file)
@@ -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;
 }
 
index 169da04..804f679 100644 (file)
@@ -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);
index 2d3308d..34a2133 100644 (file)
@@ -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<int16_t>(bbox->max.x - bbox->min.x) - 1;
     auto maxy = miny + static_cast<int16_t>(bbox->max.y - bbox->min.y) - 1;
 
-    while (spanCnt && spans < end ) {
+    while (spanCnt && spans < end) {
         if (spans->y > maxy) {
             spans = end;
             break;
index c27fe79..3577ccd 100644 (file)
@@ -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);
index d7c71e5..5677129 100755 (executable)
@@ -69,7 +69,7 @@ bool PngLoader::read()
     image->format = PNG_FORMAT_BGRA;
     buffer = static_cast<png_bytep>(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;
     }