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/intern/BLI_ghash.c
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/intern/BLI_ghash.c')
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 6daa2928716..729f5309523 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -149,17 +149,17 @@ int BLI_ghashIterator_isDone(GHashIterator *ghi) {
/***/
-unsigned int BLI_ghashutil_ptrhash(void *key) {
+unsigned int BLI_ghashutil_ptrhash(const void *key) {
return (unsigned int)(intptr_t)key;
}
-int BLI_ghashutil_ptrcmp(void *a, void *b) {
+int BLI_ghashutil_ptrcmp(const void *a, const void *b) {
if (a==b)
return 0;
else
return (a<b)?-1:1;
}
-unsigned int BLI_ghashutil_inthash(void *ptr) {
+unsigned int BLI_ghashutil_inthash(const void *ptr) {
uintptr_t key = (uintptr_t)ptr;
key += ~(key << 16);
@@ -172,15 +172,15 @@ unsigned int BLI_ghashutil_inthash(void *ptr) {
return (unsigned int)(key & 0xffffffff);
}
-int BLI_ghashutil_intcmp(void *a, void *b) {
+int BLI_ghashutil_intcmp(const void *a, const void *b) {
if (a==b)
return 0;
else
return (a<b)?-1:1;
}
-unsigned int BLI_ghashutil_strhash(void *ptr) {
- char *s= ptr;
+unsigned int BLI_ghashutil_strhash(const void *ptr) {
+ const char *s= ptr;
unsigned int i= 0;
unsigned char c;
@@ -189,6 +189,6 @@ unsigned int BLI_ghashutil_strhash(void *ptr) {
return i;
}
-int BLI_ghashutil_strcmp(void *a, void *b) {
+int BLI_ghashutil_strcmp(const void *a, const void *b) {
return strcmp(a, b);
}