diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 05:24:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 05:24:58 +0400 |
commit | 3c11379e26b1aad399ecd0afc4d23df12b24f3cd (patch) | |
tree | 0a549fceeaf261e9ca0900711e99f35f6b2b0c24 /source/blender/bmesh | |
parent | 0c898514f0b1536e1b335f24a1408f70c0162c48 (diff) |
code cleanup: move bmesh inline funcs to headers (avoids compiling the C files).
Diffstat (limited to 'source/blender/bmesh')
17 files changed, 46 insertions, 42 deletions
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt index eaa0df49382..3dc10c5f97f 100644 --- a/source/blender/bmesh/CMakeLists.txt +++ b/source/blender/bmesh/CMakeLists.txt @@ -56,12 +56,12 @@ set(SRC intern/bmesh_construct.h intern/bmesh_core.c intern/bmesh_core.h - intern/bmesh_inline.c + intern/bmesh_inline.h intern/bmesh_interp.c intern/bmesh_interp.h intern/bmesh_iterators.c intern/bmesh_iterators.h - intern/bmesh_iterators_inline.c + intern/bmesh_iterators_inline.h intern/bmesh_marking.c intern/bmesh_marking.h intern/bmesh_mesh.c @@ -73,7 +73,7 @@ set(SRC intern/bmesh_mods.c intern/bmesh_mods.h intern/bmesh_opdefines.c - intern/bmesh_operator_api_inline.c + intern/bmesh_operator_api_inline.h intern/bmesh_operators.c intern/bmesh_operators.h intern/bmesh_operators_private.h diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h index a7f66bb8345..81bd164fbdf 100644 --- a/source/blender/bmesh/bmesh.h +++ b/source/blender/bmesh/bmesh.h @@ -198,11 +198,11 @@ extern "C" { #endif -#include "DNA_listBase.h" -#include "DNA_customdata_types.h" +#include "DNA_listBase.h" /* selection history uses */ +#include "DNA_customdata_types.h" /* BMesh struct in bmesh_class.h uses */ #include <stdlib.h> -#include "BLI_utildefines.h" +// #include "BLI_utildefines.h" #include "bmesh_class.h" @@ -224,8 +224,7 @@ extern "C" { #include "intern/bmesh_queries.h" #include "intern/bmesh_walkers.h" -#include "intern/bmesh_inline.c" -#include "intern/bmesh_operator_api_inline.c" +#include "intern/bmesh_inline.h" #ifdef __cplusplus } diff --git a/source/blender/bmesh/intern/bmesh_inline.c b/source/blender/bmesh/intern/bmesh_inline.h index c9e4875866a..6b529326607 100644 --- a/source/blender/bmesh/intern/bmesh_inline.c +++ b/source/blender/bmesh/intern/bmesh_inline.h @@ -20,16 +20,14 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/bmesh/intern/bmesh_inline.c +/** \file blender/bmesh/intern/bmesh_inline.h * \ingroup bmesh * * BM Inline functions. */ -#ifndef __BMESH_INLINE_C__ -#define __BMESH_INLINE_C__ - -#include "bmesh.h" +#ifndef __BMESH_INLINE_H__ +#define __BMESH_INLINE_H__ /* stuff for dealing with header flags */ #define BM_elem_flag_test( ele, hflag) _bm_elem_flag_test (&(ele)->head, hflag) @@ -113,4 +111,4 @@ BLI_INLINE int _bm_elem_index_get(const BMHeader *head) return head->index; } -#endif /* __BMESH_INLINE_C__ */ +#endif /* __BMESH_INLINE_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c index e58e989c41f..b53896ae722 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.c +++ b/source/blender/bmesh/intern/bmesh_iterators.c @@ -28,6 +28,7 @@ * See: bmesh_iterators_inlin.c too, some functions are here for speed reasons. */ +#include "BLI_utildefines.h" #include "bmesh.h" #include "intern/bmesh_private.h" diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h index 7b13d2de723..d3566d8aead 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.h +++ b/source/blender/bmesh/intern/bmesh_iterators.h @@ -143,6 +143,6 @@ void *bmiter__edge_of_face_step(struct BMIter *iter); void bmiter__loop_of_face_begin(struct BMIter *iter); void *bmiter__loop_of_face_step(struct BMIter *iter); -#include "intern/bmesh_iterators_inline.c" +#include "intern/bmesh_iterators_inline.h" #endif /* __BMESH_ITERATORS_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_iterators_inline.c b/source/blender/bmesh/intern/bmesh_iterators_inline.h index bb16fcc439c..57f0da4081b 100644 --- a/source/blender/bmesh/intern/bmesh_iterators_inline.c +++ b/source/blender/bmesh/intern/bmesh_iterators_inline.h @@ -20,16 +20,14 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/bmesh/intern/bmesh_iterators_inline.c +/** \file blender/bmesh/intern/bmesh_iterators_inline.h * \ingroup bmesh * * BMesh inline iterator functions. */ -#ifndef __BMESH_ITERATORS_INLINE_C__ -#define __BMESH_ITERATORS_INLINE_C__ - -#include "bmesh.h" +#ifndef __BMESH_ITERATORS_INLINE_H__ +#define __BMESH_ITERATORS_INLINE_H__ /* inline here optimizes out the switch statement when called with * constant values (which is very common), nicer for loop-in-loop situations */ @@ -189,4 +187,4 @@ BLI_INLINE void *BM_iter_new(BMIter *iter, BMesh *bm, const char itype, void *da } } -#endif /* __BMESH_ITERATORS_INLINE_C__ */ +#endif /* __BMESH_ITERATORS_INLINE_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index 16214d5fbb4..1e478b9b4a8 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -26,16 +26,14 @@ * BM mesh conversion functions. */ - -#include "bmesh.h" -#include "intern/bmesh_private.h" /* for element checking */ - #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" #include "DNA_modifier_types.h" #include "DNA_key_types.h" +#include "MEM_guardedalloc.h" + #include "BLI_listbase.h" #include "BLI_array.h" #include "BLI_math_vector.h" @@ -46,7 +44,8 @@ #include "BKE_global.h" /* ugh - for looping over all objects */ #include "BKE_main.h" -#include "MEM_guardedalloc.h" +#include "bmesh.h" +#include "intern/bmesh_private.h" /* for element checking */ /* Mesh -> BMesh */ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr) diff --git a/source/blender/bmesh/intern/bmesh_mesh_validate.c b/source/blender/bmesh/intern/bmesh_mesh_validate.c index aa49a8405d7..0ec13f1df8f 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_validate.c +++ b/source/blender/bmesh/intern/bmesh_mesh_validate.c @@ -32,6 +32,8 @@ /* debug builds only */ #ifdef DEBUG +#include "BLI_utildefines.h" + #include "bmesh.h" #include "bmesh_mesh_validate.h" diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index cf114d3475f..5162932ea1b 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -54,6 +54,8 @@ * */ +#include "BLI_utildefines.h" + #include "bmesh.h" #include "intern/bmesh_private.h" diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.c b/source/blender/bmesh/intern/bmesh_operator_api_inline.h index 91fc3b1e4ca..268736cfe0e 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api_inline.c +++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h @@ -20,17 +20,14 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/bmesh/intern/bmesh_operator_api_inline.c +/** \file blender/bmesh/intern/bmesh_operator_api_inline.h * \ingroup bmesh * * BMesh inline operator functions. */ -#ifndef __BMESH_OPERATOR_API_INLINE_C__ -#define __BMESH_OPERATOR_API_INLINE_C__ - -#include "bmesh.h" - +#ifndef __BMESH_OPERATOR_API_INLINE_H__ +#define __BMESH_OPERATOR_API_INLINE_H__ /* tool flag API. never, ever ever should tool code put junk in * header flags (element->head.flag), nor should they use @@ -146,4 +143,4 @@ BLI_INLINE void *BMO_slot_map_ptr_get(BMesh *bm, BMOperator *op, const char *slo return NULL; } -#endif /* __BMESH_OPERATOR_API_INLINE_C__ */ +#endif /* __BMESH_OPERATOR_API_INLINE_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 52525dab51b..af62e4d2b29 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -94,4 +94,6 @@ void BM_mesh_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float sm float fractal, int beauty, int numcuts, int seltype, int cornertype, int singleedge, int gridfill, int seed); +#include "intern/bmesh_operator_api_inline.h" + #endif /* __BMESH_OPERATORS_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c index eca90e8e7f2..27815551a87 100644 --- a/source/blender/bmesh/intern/bmesh_structure.c +++ b/source/blender/bmesh/intern/bmesh_structure.c @@ -31,11 +31,11 @@ * Low level routines for manipulating the BM structure. */ +#include "BLI_utildefines.h" + #include "bmesh.h" #include "intern/bmesh_private.h" -#include <stdlib.h> - /** * MISC utility functions. */ diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c index bf646827a51..69ab7a91232 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.c +++ b/source/blender/bmesh/intern/bmesh_walkers.c @@ -29,6 +29,7 @@ #include <stdlib.h> #include <string.h> /* for memcpy */ +#include "BLI_utildefines.h" #include "BLI_listbase.h" #include "bmesh.h" diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index b361a0d051d..d996d756bdc 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -26,11 +26,13 @@ * BMesh Walker Code. */ +#include "BLI_utildefines.h" + #include "BKE_customdata.h" #include "bmesh.h" #include "intern/bmesh_private.h" -#include "bmesh_walkers_private.h" +#include "intern/bmesh_walkers_private.h" /** * Shell Walker: diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index 708fe2f5193..e135473fc7e 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -22,11 +22,11 @@ #include "MEM_guardedalloc.h" - -#include "bmesh.h" - #include "BLI_math.h" #include "BLI_array.h" +#include "BLI_utildefines.h" + +#include "bmesh.h" #define VERT_INPUT 1 #define EDGE_OUT 1 diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c index b21082c42bf..0da44dcf9d4 100644 --- a/source/blender/bmesh/operators/bmo_edgesplit.c +++ b/source/blender/bmesh/operators/bmo_edgesplit.c @@ -22,6 +22,8 @@ #include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" + #include "bmesh.h" #include "intern/bmesh_operators_private.h" /* own include */ diff --git a/source/blender/bmesh/tools/BME_bevel.c b/source/blender/bmesh/tools/BME_bevel.c index 139176e5276..78d02ee387a 100644 --- a/source/blender/bmesh/tools/BME_bevel.c +++ b/source/blender/bmesh/tools/BME_bevel.c @@ -33,14 +33,15 @@ #include "DNA_meshdata_types.h" #include "DNA_mesh_types.h" -#include "BKE_utildefines.h" -#include "BKE_tessmesh.h" -#include "BKE_bmesh.h" #include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_ghash.h" #include "BLI_memarena.h" +#include "BKE_utildefines.h" +#include "BKE_tessmesh.h" +#include "BKE_bmesh.h" + #include "bmesh.h" #include "intern/bmesh_private.h" |