stb_ds: maybe avoid problem with inferring template type from enum with gcc

This commit is contained in:
Sean Barrett 2019-08-11 14:37:45 -07:00
parent 787f1d646a
commit be594f1e0b
2 changed files with 5 additions and 8 deletions

View File

@ -25,7 +25,7 @@ library | lastest version | category | LoC | description
**[stb_image_write.h](stb_image_write.h)** | 1.13 | graphics | 1619 | image writing to disk: PNG, TGA, BMP
**[stb_image_resize.h](stb_image_resize.h)** | 0.96 | graphics | 2630 | resize images larger/smaller with good quality
**[stb_rect_pack.h](stb_rect_pack.h)** | 1.00 | graphics | 628 | simple 2D rectangle packer with decent quality
**[stb_ds.h](stb_ds.h)** | 0.6 | utility | 1699 | typesafe dynamic array and hash tables for C, will compile in C++
**[stb_ds.h](stb_ds.h)** | 0.61 | utility | 1696 | typesafe dynamic array and hash tables for C, will compile in C++
**[stb_sprintf.h](stb_sprintf.h)** | 1.06 | utility | 1860 | fast sprintf, snprintf for C/C++
**[stretchy_buffer.h](stretchy_buffer.h)** | 1.03 | utility | 262 | typesafe dynamic array for C (i.e. approximation to vector<>), doesn't compile as C++
**[stb_textedit.h](stb_textedit.h)** | 1.13 | user&nbsp;interface | 1404 | guts of a text editor for games etc implementing them from scratch
@ -43,7 +43,7 @@ library | lastest version | category | LoC | description
**[stb_include.h](stb_include.h)** | 0.01 | misc | 288 | implement recursive #include support, particularly for GLSL
Total libraries: 22
Total lines of C code: 56064
Total lines of C code: 56061
FAQ

View File

@ -1,4 +1,4 @@
/* stb_ds.h - v0.6 - public domain data structures - Sean Barrett 2019
/* stb_ds.h - v0.61 - public domain data structures - Sean Barrett 2019
This is a single-header-file library that provides easy-to-use
dynamic arrays and hash tables for C (also works in C++).
@ -573,11 +573,8 @@ struct stbds_string_arena
unsigned char mode; // this isn't used by the string arena itself
};
enum
{
STBDS_HM_BINARY,
STBDS_HM_STRING,
};
#define STBDS_HM_BINARY 0
#define STBDS_HM_STRING 1
enum
{