Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-03 20:05:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-03 20:05:21 +0300
commit263830f0004481cd4921f03f4242d7c80794b08d (patch)
tree30b512a06df2e619681ecacf97faee69e46913f8 /source/blender/blenlib/BLI_ghash.h
parent7c86a1a95cbc643fdbbf8c28f0422face8a15a19 (diff)
Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
Diffstat (limited to 'source/blender/blenlib/BLI_ghash.h')
-rw-r--r--source/blender/blenlib/BLI_ghash.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index 122385ca79a..96505dae448 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -45,8 +45,8 @@ extern "C" {
#include "BLI_mempool.h"
#include "BLI_blenlib.h"
-typedef unsigned int (*GHashHashFP) (void *key);
-typedef int (*GHashCmpFP) (void *a, void *b);
+typedef unsigned int (*GHashHashFP) (const void *key);
+typedef int (*GHashCmpFP) (const void *a, const void *b);
typedef void (*GHashKeyFreeFP) (void *key);
typedef void (*GHashValFreeFP) (void *val);
@@ -141,14 +141,14 @@ int BLI_ghashIterator_isDone (GHashIterator *ghi);
/* *** */
-unsigned int BLI_ghashutil_ptrhash (void *key);
-int BLI_ghashutil_ptrcmp (void *a, void *b);
+unsigned int BLI_ghashutil_ptrhash (const void *key);
+int BLI_ghashutil_ptrcmp (const void *a, const void *b);
-unsigned int BLI_ghashutil_strhash (void *key);
-int BLI_ghashutil_strcmp (void *a, void *b);
+unsigned int BLI_ghashutil_strhash (const void *key);
+int BLI_ghashutil_strcmp (const void *a, const void *b);
-unsigned int BLI_ghashutil_inthash (void *ptr);
-int BLI_ghashutil_intcmp(void *a, void *b);
+unsigned int BLI_ghashutil_inthash (const void *ptr);
+int BLI_ghashutil_intcmp(const void *a, const void *b);
/*begin of macro-inlined functions*/
extern unsigned int hashsizes[];
@@ -213,7 +213,7 @@ BM_INLINE void BLI_ghash_insert(GHash *gh, void *key, void *val) {
}
}
-BM_INLINE void* BLI_ghash_lookup(GHash *gh, void *key)
+BM_INLINE void* BLI_ghash_lookup(GHash *gh, const void *key)
{
if(gh) {
unsigned int hash= gh->hashfp(key)%gh->nbuckets;