Merge branch 'unused#801' of https://github.com/hashitaku/stb into test

master
Sean Barrett ago%!(EXTRA string=5 years)
commit 206529e08e
  1. 8
      stb_ds.h

@ -447,6 +447,12 @@ CREDITS
#define STBDS_FREE(c,p) free(p) #define STBDS_FREE(c,p) free(p)
#endif #endif
#ifdef _MSC_VER
#define STBDS_NOTUSED(v) (void)(v)
#else
#define STBDS_NOTUSED(v) (void)sizeof(v)
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -827,6 +833,7 @@ void stbds_rand_seed(size_t seed)
static size_t stbds_probe_position(size_t hash, size_t slot_count, size_t slot_log2) static size_t stbds_probe_position(size_t hash, size_t slot_count, size_t slot_log2)
{ {
STBDS_NOTUSED(slot_log2);
size_t pos; size_t pos;
pos = hash & (slot_count-1); pos = hash & (slot_count-1);
#ifdef STBDS_INTERNAL_BUCKET_START #ifdef STBDS_INTERNAL_BUCKET_START
@ -1166,6 +1173,7 @@ size_t stbds_hash_bytes(void *p, size_t len, size_t seed)
static int stbds_is_key_equal(void *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode, size_t i) static int stbds_is_key_equal(void *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode, size_t i)
{ {
STBDS_NOTUSED(keyoffset);
if (mode >= STBDS_HM_STRING) if (mode >= STBDS_HM_STRING)
return 0==strcmp((char *) key, * (char **) ((char *) a + elemsize*i + keyoffset)); return 0==strcmp((char *) key, * (char **) ((char *) a + elemsize*i + keyoffset));
else else

Loading…
Cancel
Save