From bd0ffd8d6b52ae3dc95af919cb91da092cfa17ef Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 11 Jul 2019 17:12:23 +0900 Subject: [PATCH] replace integers to size_t data type. these data source are size_t, keep the consistency to avoid type converting. --- example/lottieview.h | 2 +- inc/rlottiecommon.h | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/example/lottieview.h b/example/lottieview.h index 34c414f..fcaf31b 100644 --- a/example/lottieview.h +++ b/example/lottieview.h @@ -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]); diff --git a/inc/rlottiecommon.h b/inc/rlottiecommon.h index 78ce7de..805f1a3 100644 --- a/inc/rlottiecommon.h +++ b/inc/rlottiecommon.h @@ -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 char* data; + 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; -- 2.7.4