Skip to content

Commit

Permalink
Merge pull request #236 from sezero/signed-char
Browse files Browse the repository at this point in the history
change struct NSVGpaint:type to signed char
  • Loading branch information
memononen authored Dec 4, 2022
2 parents c886e50 + 0ce2e2b commit 9da543e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/nanosvg.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ typedef struct NSVGgradient {
} NSVGgradient;

typedef struct NSVGpaint {
char type;
signed char type;
union {
unsigned int color;
NSVGgradient* gradient;
Expand Down Expand Up @@ -398,7 +398,7 @@ typedef struct NSVGgradientData
{
char id[64];
char ref[64];
char type;
signed char type;
union {
NSVGlinearData linear;
NSVGradialData radial;
Expand Down Expand Up @@ -818,7 +818,7 @@ static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id)
return NULL;
}

static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, float *xform, char* paintType)
static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, float *xform, signed char* paintType)
{
NSVGgradientData* data = NULL;
NSVGgradientData* ref = NULL;
Expand Down Expand Up @@ -2636,7 +2636,7 @@ static void nsvg__parseSVG(NSVGparser* p, const char** attr)
}
}

static void nsvg__parseGradient(NSVGparser* p, const char** attr, char type)
static void nsvg__parseGradient(NSVGparser* p, const char** attr, signed char type)
{
int i;
NSVGgradientData* grad = (NSVGgradientData*)malloc(sizeof(NSVGgradientData));
Expand Down
2 changes: 1 addition & 1 deletion src/nanosvgrast.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ typedef struct NSVGmemPage {
} NSVGmemPage;

typedef struct NSVGcachedPaint {
char type;
signed char type;
char spread;
float xform[6];
unsigned int colors[256];
Expand Down

0 comments on commit 9da543e

Please sign in to comment.