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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-09-01 19:01:15 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-09-01 19:01:15 +0400
commit35b61a7512dc1b8b1d8bc562aad2a72d254b8a69 (patch)
tree5050db48823af6cf23eee62b5a013e2f208fdded /source/blender/bmesh/intern
parent901dea87a1266479d3b7aab6cfd2d5fbf6adc393 (diff)
Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers to use special compiler's hints use a special file where all things like this are concentrated. Makes code easier to follow and allows to manage special attributes in more efficient way. Thanks Campbell for review!
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h13
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h9
2 files changed, 6 insertions, 16 deletions
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index b5535b59321..bb25d3fabd1 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -39,6 +39,7 @@
*
*/
+#include "BLI_compiler_attrs.h"
#include "BLI_mempool.h"
/* Defines for passing to BM_iter_new.
@@ -181,18 +182,10 @@ typedef struct BMIter {
char itype;
} BMIter;
-void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index) ATTR_WARN_UNUSED_RESULT;
int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, const int len);
void *BM_iter_as_arrayN(BMesh *bm, const char itype, void *data, int *r_len,
- void **stack_array, int stack_array_size)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+ void **stack_array, int stack_array_size) ATTR_WARN_UNUSED_RESULT;
int BMO_iter_as_array(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char restrictmask,
void **array, const int len);
void *BMO_iter_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char restrictmask,
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h
index e5dc5c081c3..90f0075da26 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -27,12 +27,9 @@
* \ingroup bmesh
*/
-int BM_face_calc_tessellation(const BMFace *f, BMLoop **r_loops, int (*r_index)[3])
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
- __attribute__((nonnull))
-#endif
-;
+#include "BLI_compiler_attrs.h"
+
+int BM_face_calc_tessellation(const BMFace *f, BMLoop **r_loops, int (*r_index)[3]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BM_face_calc_normal(const BMFace *f, float r_no[3]);
void BM_face_calc_normal_vcos(BMesh *bm, BMFace *f, float r_no[3],
float const (*vertexCos)[3]);