diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-01 04:46:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-01 04:46:04 +0400 |
commit | 2924a02a3561eed7899d5087f2a7a6c31529e18f (patch) | |
tree | f7e30878a3492cd0e91e2eaa5c8010ff6f0b930a /source/blender/bmesh | |
parent | ce326e20c85bc91471e681fa77f71be528302af3 (diff) |
move strict compiler checks into a header so its easier to manage in one place (pragmas were copied around).
also enable more strict warnings for BLF (which had some incorrect casts).
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_inline.h | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operator_api_inline.h | 4 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bisect_plane.c | 9 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_edgenet.c | 9 |
4 files changed, 6 insertions, 18 deletions
diff --git a/source/blender/bmesh/intern/bmesh_inline.h b/source/blender/bmesh/intern/bmesh_inline.h index 102e9d47ffd..5ac6d7da61b 100644 --- a/source/blender/bmesh/intern/bmesh_inline.h +++ b/source/blender/bmesh/intern/bmesh_inline.h @@ -56,7 +56,7 @@ BLI_INLINE void _bm_elem_flag_enable(BMHeader *head, const char hflag) BLI_INLINE void _bm_elem_flag_disable(BMHeader *head, const char hflag) { - head->hflag &= ~hflag; + head->hflag &= (char)~hflag; } BLI_INLINE void _bm_elem_flag_set(BMHeader *head, const char hflag, const int val) diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.h b/source/blender/bmesh/intern/bmesh_operator_api_inline.h index 3a9bf597420..91cd094bf24 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api_inline.h +++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h @@ -55,13 +55,13 @@ BLI_INLINE void _bmo_elem_flag_enable(BMesh *bm, BMFlagLayer *oflags, const shor BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, const short oflag) { - oflags[bm->stackdepth - 1].f &= ~oflag; + oflags[bm->stackdepth - 1].f &= (short)~oflag; } BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, const short oflag, int val) { if (val) oflags[bm->stackdepth - 1].f |= oflag; - else oflags[bm->stackdepth - 1].f &= ~oflag; + else oflags[bm->stackdepth - 1].f &= (short)~oflag; } BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, const short oflag) diff --git a/source/blender/bmesh/tools/bmesh_bisect_plane.c b/source/blender/bmesh/tools/bmesh_bisect_plane.c index 621b2162c2c..bfe710d9fdd 100644 --- a/source/blender/bmesh/tools/bmesh_bisect_plane.c +++ b/source/blender/bmesh/tools/bmesh_bisect_plane.c @@ -43,18 +43,11 @@ #include "BLI_linklist.h" #include "BLI_linklist_stack.h" #include "BLI_math.h" +#include "BLI_strict_flags.h" #include "bmesh.h" #include "bmesh_bisect_plane.h" /* own include */ -#ifdef __GNUC__ -# pragma GCC diagnostic error "-Wsign-conversion" -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */ -# pragma GCC diagnostic error "-Wsign-compare" -# pragma GCC diagnostic error "-Wconversion" -# endif -#endif - /* -------------------------------------------------------------------- */ /* Math utils */ diff --git a/source/blender/bmesh/tools/bmesh_edgenet.c b/source/blender/bmesh/tools/bmesh_edgenet.c index 066ccbb0948..14d474fed61 100644 --- a/source/blender/bmesh/tools/bmesh_edgenet.c +++ b/source/blender/bmesh/tools/bmesh_edgenet.c @@ -39,13 +39,8 @@ #include "bmesh.h" #include "bmesh_edgenet.h" /* own include */ -#ifdef __GNUC__ -# pragma GCC diagnostic error "-Wsign-conversion" -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */ -# pragma GCC diagnostic error "-Wsign-compare" -# pragma GCC diagnostic error "-Wconversion" -# endif -#endif +#include "BLI_strict_flags.h" /* keep last */ + /* Data for one end of an edge involved in a bevel */ typedef struct VertNetInfo { |