replace integers to size_t data type.
authorHermet Park <hermetpark@gmail.com>
Thu, 11 Jul 2019 08:12:23 +0000 (17:12 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 18 Jul 2019 11:04:28 +0000 (20:04 +0900)
these data source are size_t,
keep the consistency to avoid type converting.

example/lottieview.h
inc/rlottiecommon.h

index 34c414f..fcaf31b 100644 (file)
@@ -409,7 +409,7 @@ public:
         const float *data = node->mPath.ptPtr;
         if (!data) return;
 
-        for (int i = 0; i < node->mPath.elmCount; i++) {
+        for (size_t i = 0; i < node->mPath.elmCount; i++) {
             switch (node->mPath.elmPtr[i]) {
             case 0:
                 evas_vg_shape_append_move_to(shape, data[0], data[1]);
index 78ce7de..805f1a3 100644 (file)
@@ -117,9 +117,9 @@ typedef enum
 typedef struct LOTMask {
     struct {
         const float *ptPtr;
-        int          ptCount;
+        size_t       ptCount;
         const char*  elmPtr;
-        int          elmCount;
+        size_t       elmCount;
     } mPath;
     LOTMaskType mMode;
     int mAlpha;
@@ -143,9 +143,9 @@ typedef struct LOTNode {
 
     struct {
         const float *ptPtr;
-        int          ptCount;
-        const char*  elmPtr;
-        int          elmCount;
+        size_t       ptCount;
+        const char  *elmPtr;
+        size_t       elmCount;
     } mPath;
 
     struct {
@@ -158,14 +158,14 @@ typedef struct LOTNode {
         LOTCapStyle  cap;
         LOTJoinStyle join;
         int       meterLimit;
-        float*    dashArray;
+        float    *dashArray;
         int       dashArraySize;
     } mStroke;
 
     struct {
-        LOTGradientType type;
+        LOTGradientType  type;
         LOTGradientStop *stopPtr;
-        unsigned int stopCount;
+        size_t           stopCount;
         struct {
             float x, y;
         } start, end, center, focal;
@@ -174,7 +174,7 @@ typedef struct LOTNode {
     } mGradient;
 
     struct {
-        unsigned chardata;
+        unsigned char *data;
         int width;
         int height;
         struct {
@@ -195,24 +195,24 @@ typedef struct LOTLayerNode {
 
     struct {
         LOTMask        *ptr;
-        unsigned int    size;
+        size_t          size;
     } mMaskList;
 
     struct {
         const float *ptPtr;
-        int          ptCount;
-        const char*  elmPtr;
-        int          elmCount;
+        size_t       ptCount;
+        const char  *elmPtr;
+        size_t       elmCount;
     } mClipPath;
 
     struct {
         struct LOTLayerNode   **ptr;
-        unsigned int          size;
+        size_t                  size;
     } mLayerList;
 
     struct {
         LOTNode        **ptr;
-        unsigned int   size;
+        size_t           size;
     } mNodeList;
 
     LOTMatteType mMatte;