Revert "[3.0] Change 'char' type to 'signed char'" 74/72274/1
authorsuhyung Eom <suhyung.eom@samsung.com>
Tue, 31 May 2016 08:57:27 +0000 (17:57 +0900)
committersuhyung Eom <suhyung.eom@samsung.com>
Tue, 31 May 2016 08:57:49 +0000 (17:57 +0900)
This reverts commit af6ff4a3555b226f518b5c8fa4e3754298f21cb3.
Change-Id: I7246c1c0868041bf1814be425afa09f641f2b152

dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.cc
dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.h
dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc

index 9643567..e52cb15 100644 (file)
@@ -230,25 +230,13 @@ typedef struct NSVGgradientData
 {
     char id[64];
     char ref[64];
-
-    /**
-     * In the original file, using char type (without signed or unsigned) can be interpreted
-     * as 'unsigned char' in some build environments, like ARM architecture.
-     * To prevent the unexpected behavior, we replace 'char type' with 'signed char type' here.
-     */
-    signed char type;
+    char type;
     union {
         NSVGlinearData linear;
         NSVGradialData radial;
     };
     char spread;
-
-    /**
-     * In the original file, using char type (without signed or unsigned) can be interpreted
-     * as 'unsigned char' in some build environments, like ARM architecture.
-     * To prevent the unexpected behavior, we replace 'char units' with 'signed char units' here.
-     */
-    signed char units;
+    char units;
     float xform[6];
     int nstops;
     NSVGgradientStop* stops;
@@ -655,12 +643,7 @@ static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id)
     return NULL;
 }
 
-/**
- * In the original file, using char type (without signed or unsigned) can be interpreted
- * as 'unsigned char' in some build environments, like ARM architecture.
- * To prevent the unexpected behavior, we replace 'char paintType' with 'signed char paintType' here.
- */
-static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, signed char* paintType)
+static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, char* paintType)
 {
     NSVGattrib* attr = nsvg__getAttr(p);
     NSVGgradientData* data = NULL;
index 2634297..608bcd6 100644 (file)
@@ -113,12 +113,7 @@ typedef struct NSVGgradient {
 } NSVGgradient;
 
 typedef struct NSVGpaint {
-       /**
-        * In the original file, using char type (without signed or unsigned) can be interpreted
-        * as 'unsigned char' in some build environments, like ARM architecture.
-        * To prevent the unexpected behavior, we replace 'char type' with 'signed char type' here.
-        */
-       signed char type;
+       char type;
        union {
                unsigned int color;
                NSVGgradient* gradient;
index a6c843e..73bfd2c 100644 (file)
@@ -68,12 +68,7 @@ typedef struct NSVGmemPage {
 } NSVGmemPage;
 
 typedef struct NSVGcachedPaint {
-    /**
-     * In the original file, using char type (without signed or unsigned) can be interpreted
-     * as 'unsigned char' in some build environments, like ARM architecture.
-     * To prevent the unexpected behavior, we replace 'char type' with 'signed char type' here.
-     */
-    signed char type;
+    char type;
     char spread;
     float xform[6];
     unsigned int colors[256];
@@ -878,12 +873,7 @@ static void nsvg__fillScanline(unsigned char* scanline, int len, int x0, int x1,
 // note: this routine clips fills that extend off the edges... ideally this
 // wouldn't happen, but it could happen if the truetype glyph bounding boxes
 // are wrong, or if the user supplies a too-small bitmap
-/**
- * In the original file, using char type (without signed or unsigned) can be interpreted
- * as 'unsigned char' in some build environments, like ARM architecture.
- * To prevent the unexpected behavior, we replace 'char fillRule' with 'signed char fillRule' here.
- */
-static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, signed char fillRule)
+static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule)
 {
     // non-zero winding fill
     int x0 = 0, w = 0;