[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42991] trunk/blender: style edits for function declarations

Campbell Barton ideasman42 at gmail.com
Fri Dec 30 08:55:27 CET 2011


Revision: 42991
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42991
Author:   campbellbarton
Date:     2011-12-30 07:55:15 +0000 (Fri, 30 Dec 2011)
Log Message:
-----------
style edits for function declarations

Modified Paths:
--------------
    trunk/blender/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp
    trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp
    trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
    trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
    trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp
    trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
    trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
    trunk/blender/intern/smoke/intern/smoke_API.cpp
    trunk/blender/release/plugins/sequence/color-correction-hsv.c
    trunk/blender/release/plugins/sequence/color-correction-yuv.c
    trunk/blender/release/plugins/sequence/dnr.c
    trunk/blender/release/plugins/sequence/gamma.c
    trunk/blender/source/blender/blenkernel/BKE_array_mallocn.h
    trunk/blender/source/blender/blenkernel/intern/depsgraph.c
    trunk/blender/source/blender/blenkernel/intern/particle.c
    trunk/blender/source/blender/blenkernel/intern/particle_system.c
    trunk/blender/source/blender/collada/MeshImporter.cpp
    trunk/blender/source/blender/editors/mesh/editmesh_mods.c
    trunk/blender/source/blender/editors/mesh/editmesh_tools.c
    trunk/blender/source/blender/editors/physics/physics_fluid.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
    trunk/blender/source/blender/nodes/shader/nodes/node_shader_dynamic.c
    trunk/blender/source/blender/quicktime/apple/qtkit_export.m
    trunk/blender/source/blender/quicktime/apple/qtkit_import.m
    trunk/blender/source/blender/quicktime/apple/quicktime_export.c
    trunk/blender/source/blender/quicktime/apple/quicktime_import.c
    trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    trunk/blender/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
    trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    trunk/blender/source/gameengine/Converter/KX_IpoConvert.cpp
    trunk/blender/source/gameengine/Expressions/InputParser.cpp
    trunk/blender/source/gameengine/Expressions/Operator1Expr.cpp
    trunk/blender/source/gameengine/Expressions/Operator2Expr.cpp
    trunk/blender/source/gameengine/Expressions/PyObjectPlus.h
    trunk/blender/source/gameengine/Expressions/Value.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
    trunk/blender/source/gameengine/GamePlayer/xembed/blenderplayer-wrapper.c
    trunk/blender/source/gameengine/Ketsji/KX_TouchSensor.cpp

Modified: trunk/blender/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp
===================================================================
--- trunk/blender/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -202,7 +202,7 @@
 }
 
 
-	void 
+	void
 BSP_GhostTestApp3D::
 UpdateFrame(
 ){
@@ -210,9 +210,9 @@
 
 	GHOST_Rect v_rect;
 	m_window->getClientBounds(v_rect);
-	
+
 	glViewport(0,0,v_rect.getWidth(),v_rect.getHeight());
-	
+
 }
 }
 

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -579,7 +579,8 @@
 static bool g_hasFirstFile = false;
 static char g_firstFileBuf[512];
 
-extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) { 
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
+{
 	if (g_hasFirstFile) {
 		strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
 		buf[FIRSTFILEBUFLG - 1] = '\0';

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm	2011-12-30 07:55:15 UTC (rev 42991)
@@ -451,7 +451,8 @@
 static char g_firstFileBuf[512];
 
 //TODO:Need to investigate this. Function called too early in creator.c to have g_hasFirstFile == true
-extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) { 
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
+{
 	if (g_hasFirstFile) {
 		strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
 		buf[FIRSTFILEBUFLG - 1] = '\0';

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -296,7 +296,8 @@
 	
 }
 
-static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep) {
+static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep)
+{
 	int fd = ConnectionNumber(display);
 	fd_set fds;
 	

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -70,7 +70,8 @@
 	{ kEventClassWindow, kEventWindowZoom },  /* for new zoom behaviour */ 
 };
 
-static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData) {
+static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData)
+{
 	WindowRef mywindow;
 	GHOST_WindowCarbon *ghost_window;
 	OSStatus err;

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -1269,7 +1269,8 @@
 /*  Ron Fosner's code for weighting pixel formats and forcing software.
 	See http://www.opengl.org/resources/faq/technical/weight.cpp */
 
-static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
+static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd)
+{
 	int weight = 0;
 
 	/* assume desktop color depth is 32 bits per pixel */
@@ -1302,7 +1303,8 @@
 
 /* A modification of Ron Fosner's replacement for ChoosePixelFormat */
 /* returns 0 on error, else returns the pixel format number to be used */
-static int EnumPixelFormats(HDC hdc) {
+static int EnumPixelFormats(HDC hdc)
+{
 	int iPixelFormat;
 	int i, n, w, weight = 0;
 	PIXELFORMATDESCRIPTOR pfd;

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -472,7 +472,8 @@
 	is configured but not plugged in.
 
 */
-static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent) {
+static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
+{
 	fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
 		theEvent->error_code, theEvent->request_code) ;
 

Modified: trunk/blender/intern/smoke/intern/smoke_API.cpp
===================================================================
--- trunk/blender/intern/smoke/intern/smoke_API.cpp	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/intern/smoke/intern/smoke_API.cpp	2011-12-30 07:55:15 UTC (rev 42991)
@@ -211,7 +211,8 @@
 	wt->initBlenderRNA(strength);
 }
 
-template < class T > inline T ABS( T a ) {
+template < class T > inline T ABS( T a )
+{
 	return (0 < a) ? a : -a ;
 }
 

Modified: trunk/blender/release/plugins/sequence/color-correction-hsv.c
===================================================================
--- trunk/blender/release/plugins/sequence/color-correction-hsv.c	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/release/plugins/sequence/color-correction-hsv.c	2011-12-30 07:55:15 UTC (rev 42991)
@@ -62,7 +62,8 @@
 void plugin_but_changed(int but) {}
 void plugin_init() {}
 
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
 	info->name= name;
 	info->nvars= sizeof(varstr)/sizeof(VarStruct);
 	info->cfra= &cfra;

Modified: trunk/blender/release/plugins/sequence/color-correction-yuv.c
===================================================================
--- trunk/blender/release/plugins/sequence/color-correction-yuv.c	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/release/plugins/sequence/color-correction-yuv.c	2011-12-30 07:55:15 UTC (rev 42991)
@@ -62,7 +62,8 @@
 void plugin_but_changed(int but) {}
 void plugin_init() {}
 
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
 	info->name= name;
 	info->nvars= sizeof(varstr)/sizeof(VarStruct);
 	info->cfra= &cfra;
@@ -74,7 +75,8 @@
 	info->callback= plugin_but_changed;
 }
 
-static void rgb_to_yuv(float rgb[3], float yuv[3]) {
+static void rgb_to_yuv(float rgb[3], float yuv[3])
+{
 	yuv[0]= 0.299*rgb[0] + 0.587*rgb[1] + 0.114*rgb[2];
 	yuv[1]= 0.492*(rgb[2] - yuv[0]);
 	yuv[2]= 0.877*(rgb[0] - yuv[0]);
@@ -84,7 +86,8 @@
 	yuv[2] /= 0.615;
 }
 
-static void yuv_to_rgb(float yuv[3], float rgb[3]) {
+static void yuv_to_rgb(float yuv[3], float rgb[3])
+{
 	yuv[1] *= 0.436;
 	yuv[2] *= 0.615;
 

Modified: trunk/blender/release/plugins/sequence/dnr.c
===================================================================
--- trunk/blender/release/plugins/sequence/dnr.c	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/release/plugins/sequence/dnr.c	2011-12-30 07:55:15 UTC (rev 42991)
@@ -90,7 +90,8 @@
 	free(d);
 }
 
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
 	info->name= name;
 	info->nvars= sizeof(varstr)/sizeof(VarStruct);
 	info->cfra= &cfra;

Modified: trunk/blender/release/plugins/sequence/gamma.c
===================================================================
--- trunk/blender/release/plugins/sequence/gamma.c	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/release/plugins/sequence/gamma.c	2011-12-30 07:55:15 UTC (rev 42991)
@@ -67,7 +67,8 @@
 void plugin_but_changed(int but) {}
 void plugin_init() {}
 
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
 	info->name= name;
 	info->nvars= sizeof(varstr)/sizeof(VarStruct);
 	info->cfra= &cfra;

Modified: trunk/blender/source/blender/blenkernel/BKE_array_mallocn.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_array_mallocn.h	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/source/blender/blenkernel/BKE_array_mallocn.h	2011-12-30 07:55:15 UTC (rev 42991)
@@ -34,28 +34,28 @@
  */
 
 /* example of usage:
+ *
+ * int *arr = NULL;
+ * V_DECLARE(arr);
+ * int i;
+ *
+ * for (i=0; i<10; i++) {
+ * 	V_GROW(arr);
+ * 	arr[i] = something;
+ * }
+ * V_FREE(arr);
+ *
+ * arrays are buffered, using double-buffering (so on each reallocation,
+ * the array size is doubled).  supposedly this should give good Big Oh
+ * behaviour, though it may not be the best in practice.
+ */
 
-int *arr = NULL;
-V_DECLARE(arr);
-int i;
-
-for (i=0; i<10; i++) {
-	V_GROW(arr);
-	arr[i] = something;
-}
-V_FREE(arr);
-
-arrays are buffered, using double-buffering (so on each reallocation,
-the array size is doubled).  supposedly this should give good Big Oh
-behaviour, though it may not be the best in practice.
-*/
-
 #define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp
 
-/*in the future, I plan on having V_DECLARE allocate stack memory it'll
-  use at first, and switch over to heap when it needs more.  that'll mess
-  up cases where you'd want to use this API to build a dynamic list for
-  non-local use, so all such cases should use this macro.*/
+/* in the future, I plan on having V_DECLARE allocate stack memory it'll
+ * use at first, and switch over to heap when it needs more.  that'll mess
+ * up cases where you'd want to use this API to build a dynamic list for
+ * non-local use, so all such cases should use this macro.*/
 #define V_DYNDECLARE(vec) V_DECLARE(vec)
 
 /*this returns the entire size of the array, including any buffering.*/

Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2011-12-30 07:25:49 UTC (rev 42990)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2011-12-30 07:55:15 UTC (rev 42991)
@@ -269,7 +269,8 @@
 	}
 }
 
-void	*pop_ob_queue(struct DagNodeQueue *queue) {
+void	*pop_ob_queue(struct DagNodeQueue *queue)
+{
 	return(pop_queue(queue)->ob);
 }
 
@@ -278,7 +279,8 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list