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>2013-04-20 21:24:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-20 21:24:40 +0400
commit01f8b229c94b823ba8745e421ee4c3a8712a7237 (patch)
tree45fffab96554c0356c15a65e643c528d6b7de9bf /source/blender/blenlib/BLI_smallhash.h
parentef170c16be8a8a228f3e0a06bca17cd7766a7ac1 (diff)
revert own change from 56177, game bounds can be useful to see in editmode,
also use gcc attributes for smallhash header and some style edits to recent commit.
Diffstat (limited to 'source/blender/blenlib/BLI_smallhash.h')
-rw-r--r--source/blender/blenlib/BLI_smallhash.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h
index 09dd254c3fa..7b591c071c6 100644
--- a/source/blender/blenlib/BLI_smallhash.h
+++ b/source/blender/blenlib/BLI_smallhash.h
@@ -59,15 +59,27 @@ typedef struct {
int i;
} SmallHashIter;
-void BLI_smallhash_init(SmallHash *hash);
-void BLI_smallhash_release(SmallHash *hash);
-void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item);
-void BLI_smallhash_remove(SmallHash *hash, uintptr_t key);
-void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key);
-int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key);
-int BLI_smallhash_count(SmallHash *hash);
-void *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key);
-void *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key);
+#ifdef __GNUC__
+# define ATTR_NONULL_FIRST __attribute__((nonnull(1)))
+# define ATTR_UNUSED_RESULT __attribute__((warn_unused_result))
+#else
+# define ATTR_NONULL_FIRST
+# define ATTR_UNUSED_RESULT
+#endif
+
+
+void BLI_smallhash_init(SmallHash *hash) ATTR_NONULL_FIRST;
+void BLI_smallhash_release(SmallHash *hash) ATTR_NONULL_FIRST;
+void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item) ATTR_NONULL_FIRST;
+void BLI_smallhash_remove(SmallHash *hash, uintptr_t key) ATTR_NONULL_FIRST;
+void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key) ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
+int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key) ATTR_NONULL_FIRST;
+int BLI_smallhash_count(SmallHash *hash) ATTR_NONULL_FIRST;
+void *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key) ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
+void *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key) ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
/* void BLI_smallhash_print(SmallHash *hash); */ /* UNUSED */
+#undef ATTR_NONULL_FIRST
+#undef ATTR_UNUSED_RESULT
+
#endif /* __BLI_SMALLHASH_H__ */