[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55948] trunk/blender: code cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_begin().

Campbell Barton ideasman42 at gmail.com
Thu Apr 11 01:52:07 CEST 2013


Revision: 55948
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55948
Author:   campbellbarton
Date:     2013-04-10 23:52:07 +0000 (Wed, 10 Apr 2013)
Log Message:
-----------
code cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_begin().

Modified Paths:
--------------
    trunk/blender/intern/elbeem/intern/simulation_object.cpp
    trunk/blender/intern/smoke/intern/spectrum.cpp
    trunk/blender/source/blender/blenlib/BLI_scanfill.h
    trunk/blender/source/blender/blenlib/intern/scanfill.c

Modified: trunk/blender/intern/elbeem/intern/simulation_object.cpp
===================================================================
--- trunk/blender/intern/elbeem/intern/simulation_object.cpp	2013-04-10 23:25:44 UTC (rev 55947)
+++ trunk/blender/intern/elbeem/intern/simulation_object.cpp	2013-04-10 23:52:07 UTC (rev 55948)
@@ -33,7 +33,7 @@
 LbmSolverInterface* createSolver();
 
 #if PARALLEL==1
-int omp_threadcache;
+static int omp_threadcache;
 #endif
 
 /******************************************************************************
@@ -71,7 +71,7 @@
   	if(mpParam)          delete mpParam;
 	if(mpParts)          delete mpParts;
 	debMsgStd("SimulationObject",DM_MSG,"El'Beem Done!\n",10);
-#if PARALLEL==1
+#if (PARALLEL == 1)
 	omp_set_num_threads(omp_threadcache);
 	printf("Resetting omp_threads to cached value %d \n", omp_threadcache);
 #endif

Modified: trunk/blender/intern/smoke/intern/spectrum.cpp
===================================================================
--- trunk/blender/intern/smoke/intern/spectrum.cpp	2013-04-10 23:25:44 UTC (rev 55947)
+++ trunk/blender/intern/smoke/intern/spectrum.cpp	2013-04-10 23:52:07 UTC (rev 55948)
@@ -52,8 +52,10 @@
 
 /* White point chromaticities. */
 
+#if 0
 #define IlluminantC     0.3101, 0.3162	    	/* For NTSC television */
 #define IlluminantD65   0.3127, 0.3291	    	/* For EBU and SMPTE */
+#endif
 #define IlluminantE 	0.33333333, 0.33333333  /* CIE equal-energy illuminant */
 
 /*  Gamma of nonlinear correction.

Modified: trunk/blender/source/blender/blenlib/BLI_scanfill.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_scanfill.h	2013-04-10 23:25:44 UTC (rev 55947)
+++ trunk/blender/source/blender/blenlib/BLI_scanfill.h	2013-04-10 23:52:07 UTC (rev 55948)
@@ -107,31 +107,14 @@
 	 * when this flag is set, we'll never get back more faces then (totvert - 2) */
 	BLI_SCANFILL_CALC_HOLES            = (1 << 2)
 };
-
-int BLI_scanfill_begin(ScanFillContext *sf_ctx);
-int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag);
-int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag,
-                         const float nor_proj[3]);
+void BLI_scanfill_begin(ScanFillContext *sf_ctx);
+int  BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag);
+int  BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag,
+                          const float nor_proj[3]);
 void BLI_scanfill_end(ScanFillContext *sf_ctx);
 
 /* These callbacks are needed to make the lib finction properly */
-
-/**
- * Set a function taking a (char *) as argument to flag errors. If the
- * callback is not set, the error is discarded.
- * \param f The function to use as callback
- * \attention used in creator.c
- */
 void BLI_setErrorCallBack(void (*f)(const char *));
-
-/**
- * Set a function to be able to interrupt the execution of processing
- * in this module. If the function returns true, the execution will
- * terminate gracefully. If the callback is not set, interruption is
- * not possible.
- * \param f The function to use as callback
- * \attention used in creator.c
- */
 void BLI_setInterruptCallBack(int (*f)(void));
 
 #ifdef __cplusplus

Modified: trunk/blender/source/blender/blenlib/intern/scanfill.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/scanfill.c	2013-04-10 23:25:44 UTC (rev 55947)
+++ trunk/blender/source/blender/blenlib/intern/scanfill.c	2013-04-10 23:52:07 UTC (rev 55948)
@@ -47,11 +47,25 @@
 static void (*BLI_localErrorCallBack)(const char *) = NULL;
 static int (*BLI_localInterruptCallBack)(void) = NULL;
 
+/**
+ * Set a function taking a (char *) as argument to flag errors. If the
+ * callback is not set, the error is discarded.
+ * \param f The function to use as callback
+ * \attention used in creator.c
+ */
 void BLI_setErrorCallBack(void (*f)(const char *))
 {
 	BLI_localErrorCallBack = f;
 }
 
+/**
+ * Set a function to be able to interrupt the execution of processing
+ * in this module. If the function returns true, the execution will
+ * terminate gracefully. If the callback is not set, interruption is
+ * not possible.
+ * \param f The function to use as callback
+ * \attention used in creator.c
+ */
 void BLI_setInterruptCallBack(int (*f)(void))
 {
 	BLI_localInterruptCallBack = f;
@@ -826,11 +840,9 @@
 }
 
 
-int BLI_scanfill_begin(ScanFillContext *sf_ctx)
+void BLI_scanfill_begin(ScanFillContext *sf_ctx)
 {
 	memset(sf_ctx, 0, sizeof(*sf_ctx));
-
-	return 1;
 }
 
 int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag)




More information about the Bf-blender-cvs mailing list