瀏覽代碼

fix PR to work on VC6

Sean Barrett 5 年之前
父節點
當前提交
b3a74a5c8a
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      stb_ds.h

+ 1 - 2
stb_ds.h

@@ -833,8 +833,8 @@ 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;
+  STBDS_NOTUSED(slot_log2);
   pos = hash & (slot_count-1);
   pos = hash & (slot_count-1);
   #ifdef STBDS_INTERNAL_BUCKET_START
   #ifdef STBDS_INTERNAL_BUCKET_START
   pos &= ~STBDS_BUCKET_MASK;
   pos &= ~STBDS_BUCKET_MASK;
@@ -1173,7 +1173,6 @@ 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