Skip to content

Commit 675ce7f

Browse files
committed
Add prefix to problematic stb_truetype equal() func
1 parent 3bcdec2 commit 675ce7f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

nuklear.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16225,7 +16225,7 @@ static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2],
1622516225
}
1622616226
}
1622716227

16228-
static int equal(float *a, float *b)
16228+
static int stbtt__equal(float *a, float *b)
1622916229
{
1623016230
return (a[0] == b[0] && a[1] == b[1]);
1623116231
}
@@ -16273,7 +16273,7 @@ static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex
1627316273
q1[1] = (float)y1;
1627416274
q2[0] = (float)x2;
1627516275
q2[1] = (float)y2;
16276-
if (equal(q0,q1) || equal(q1,q2)) {
16276+
if (stbtt__equal(q0,q1) || stbtt__equal(q1,q2)) {
1627716277
x0 = (int)verts[i-1].x;
1627816278
y0 = (int)verts[i-1].y;
1627916279
x1 = (int)verts[i ].x;

src/stb_truetype.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4459,7 +4459,7 @@ static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2],
44594459
}
44604460
}
44614461

4462-
static int equal(float *a, float *b)
4462+
static int stbtt__equal(float *a, float *b)
44634463
{
44644464
return (a[0] == b[0] && a[1] == b[1]);
44654465
}
@@ -4507,7 +4507,7 @@ static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex
45074507
q1[1] = (float)y1;
45084508
q2[0] = (float)x2;
45094509
q2[1] = (float)y2;
4510-
if (equal(q0,q1) || equal(q1,q2)) {
4510+
if (stbtt__equal(q0,q1) || stbtt__equal(q1,q2)) {
45114511
x0 = (int)verts[i-1].x;
45124512
y0 = (int)verts[i-1].y;
45134513
x1 = (int)verts[i ].x;

0 commit comments

Comments
 (0)