[Bf-blender-cvs] [bd5f946] alembic: Fix for stupid MSVC, does not allow const expression as array size.

Lukas Tönne noreply at git.blender.org
Mon Apr 20 10:37:37 CEST 2015


Commit: bd5f946f39389dc2c4089b1f53f424c173c06410
Author: Lukas Tönne
Date:   Mon Apr 20 10:37:01 2015 +0200
Branches: alembic
https://developer.blender.org/rBbd5f946f39389dc2c4089b1f53f424c173c06410

Fix for stupid MSVC, does not allow const expression as array size.

===================================================================

M	source/blender/blenkernel/intern/cache_library.c

===================================================================

diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index aa0fc1f..7b49b08 100644
--- a/source/blender/blenkernel/intern/cache_library.c
+++ b/source/blender/blenkernel/intern/cache_library.c
@@ -919,7 +919,7 @@ static bool hairsim_find_data(HairSimCacheModifier *hsmd, DupliCache *dupcache,
 
 static void hairsim_process(HairSimCacheModifier *hsmd, CacheProcessContext *ctx, CacheProcessData *data, int frame, int frame_prev, eCacheLibrary_EvalMode eval_mode)
 {
-	static const int MAX_CACHE_EFFECTORS = 64;
+#define MAX_CACHE_EFFECTORS 64
 	
 	Object *ob;
 	Strands *strands;
@@ -958,6 +958,8 @@ static void hairsim_process(HairSimCacheModifier *hsmd, CacheProcessContext *ctx
 	pdEndEffectors(&effectors);
 	BKE_cache_effectors_free(cache_effectors, tot_cache_effectors);
 	BPH_mass_spring_solver_free(solver_data);
+	
+#undef MAX_CACHE_EFFECTORS
 }
 
 CacheModifierTypeInfo cacheModifierType_HairSimulation = {




More information about the Bf-blender-cvs mailing list