From 46046238b8097abfd1905bc39c9222b3d4b5fb13 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Fri, 3 Mar 2017 06:54:11 -0800 Subject: [PATCH] rename Point data structure as suggested in pull request --- stb_vorbis.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stb_vorbis.c b/stb_vorbis.c index 0eaed25..871133e 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -1270,13 +1270,13 @@ static void neighbors(uint16 *x, int n, int *plow, int *phigh) // this has been repurposed so y is now the original index instead of y typedef struct { - uint16 x,y; -} stbv__point; + uint16 x,id; +} stbv__floor_ordering; static int STBV_CDECL point_compare(const void *p, const void *q) { - stbv__point *a = (stbv__point *) p; - stbv__point *b = (stbv__point *) q; + stbv__floor_ordering *a = (stbv__floor_ordering *) p; + stbv__floor_ordering *b = (stbv__floor_ordering *) q; return a->x < b->x ? -1 : a->x > b->x; } @@ -3874,7 +3874,7 @@ static int start_decoder(vorb *f) g->book_list[j] = get_bits(f,8); return error(f, VORBIS_feature_not_supported); } else { - stbv__point p[31*8+2]; + stbv__floor_ordering p[31*8+2]; Floor1 *g = &f->floor_config[i].floor1; int max_class = -1; g->partitions = get_bits(f, 5); @@ -3910,11 +3910,11 @@ static int start_decoder(vorb *f) // precompute the sorting for (j=0; j < g->values; ++j) { p[j].x = g->Xlist[j]; - p[j].y = j; + p[j].id = j; } qsort(p, g->values, sizeof(p[0]), point_compare); for (j=0; j < g->values; ++j) - g->sorted_order[j] = (uint8) p[j].y; + g->sorted_order[j] = (uint8) p[j].id; // precompute the neighbors for (j=2; j < g->values; ++j) { int low,hi;