diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-04 01:22:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-04 01:22:43 +0400 |
commit | 0994e7f96fd7b98ba3967ca44b93b93fa1c31920 (patch) | |
tree | e940d2effa5ddca225252f1082d44e498ff5ebe2 /source/blender/modifiers/intern/MOD_weightvgproximity.c | |
parent | a54dd1155f4e476dda77e4d6bad5c100854b96bc (diff) |
move timeit macros into their own include, since they are only used for testing and unrelated to PIL_time.h typical use.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgproximity.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgproximity.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 63267538528..67168e52949 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -28,18 +28,12 @@ * \ingroup modifiers */ -#define DO_PROFILE 0 - #include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BLI_math.h" #include "BLI_string.h" #include "BLI_rand.h" -#if DO_PROFILE - #include "PIL_time.h" -#endif - #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" @@ -58,6 +52,13 @@ #include "MOD_util.h" #include "MOD_weightvg_util.h" +// #define USE_TIMEIT + +#ifdef USE_TIMEIT +# include "PIL_time.h" +# include "PIL_time_utildefines.h" +#endif + /************************************** * Util functions. * **************************************/ @@ -382,8 +383,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der int do_prev = (wmd->modifier.mode & eModifierMode_DoWeightPreview); #endif -#if DO_PROFILE - TIMEIT_START(perf) +#ifdef USE_TIMEIT + TIMEIT_START(perf); #endif /* Get number of verts. */ @@ -548,8 +549,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der MEM_freeN(indices); MEM_freeN(v_cos); -#if DO_PROFILE - TIMEIT_END(perf) +#ifdef USE_TIMEIT + TIMEIT_END(perf); #endif /* Return the vgroup-modified mesh. */ |