[Bf-blender-cvs] [c1c26c3] master: Style Cleanup: remove preprocessor indentation (updated wiki style guide too)

Campbell Barton noreply at git.blender.org
Sun Dec 22 04:13:34 CET 2013


Commit: c1c26c36f62c3bfdb40b01f33004695a09ce2f4d
Author: Campbell Barton
Date:   Sun Dec 22 14:11:10 2013 +1100
http://developer.blender.org/rBc1c26c36f62c3bfdb40b01f33004695a09ce2f4d

Style Cleanup: remove preprocessor indentation (updated wiki style guide too)

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

M	intern/cycles/render/nodes.cpp
M	intern/ghost/intern/GHOST_DisplayManagerX11.cpp
M	intern/ghost/test/gears/GHOST_Test.cpp
M	intern/mikktspace/mikktspace.c
M	source/blender/blenkernel/intern/CCGSubSurf.c
M	source/blender/blenkernel/intern/cdderivedmesh.c
M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenkernel/intern/mask_rasterize.c
M	source/blender/blenkernel/intern/multires.c
M	source/blender/blenkernel/intern/node.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/blenkernel/intern/pbvh.c
M	source/blender/blenkernel/intern/pbvh_bmesh.c
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/blenkernel/intern/tracking.c
M	source/blender/blenlib/intern/path_util.c
M	source/blender/blenlib/intern/storage.c
M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/compositor/intern/COM_MemoryBuffer.h
M	source/blender/compositor/intern/COM_WorkScheduler.h
M	source/blender/compositor/nodes/COM_ImageNode.cpp
M	source/blender/compositor/nodes/COM_ImageNode.h
M	source/blender/compositor/nodes/COM_KeyingScreenNode.cpp
M	source/blender/compositor/nodes/COM_MaskNode.cpp
M	source/blender/compositor/nodes/COM_MovieClipNode.cpp
M	source/blender/compositor/nodes/COM_MuteNode.cpp
M	source/blender/compositor/nodes/COM_MuteNode.h
M	source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp
M	source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
M	source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
M	source/blender/compositor/nodes/COM_TimeNode.cpp
M	source/blender/compositor/nodes/COM_TrackPositionNode.cpp
M	source/blender/compositor/operations/COM_AntiAliasOperation.cpp
M	source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
M	source/blender/compositor/operations/COM_BlurBaseOperation.cpp
M	source/blender/compositor/operations/COM_BokehBlurOperation.cpp
M	source/blender/compositor/operations/COM_ColorCurveOperation.cpp
M	source/blender/compositor/operations/COM_ColorRampOperation.cpp
M	source/blender/compositor/operations/COM_CompositorOperation.cpp
M	source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
M	source/blender/compositor/operations/COM_CurveBaseOperation.cpp
M	source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
M	source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
M	source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
M	source/blender/compositor/operations/COM_ImageOperation.cpp
M	source/blender/compositor/operations/COM_ImageOperation.h
M	source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
M	source/blender/compositor/operations/COM_KeyingScreenOperation.h
M	source/blender/compositor/operations/COM_MaskOperation.cpp
M	source/blender/compositor/operations/COM_MixOperation.cpp
M	source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
M	source/blender/compositor/operations/COM_MovieClipOperation.cpp
M	source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
M	source/blender/compositor/operations/COM_MovieDistortionOperation.h
M	source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
M	source/blender/compositor/operations/COM_OutputFileOperation.cpp
M	source/blender/compositor/operations/COM_PlaneTrackCommonOperation.cpp
M	source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp
M	source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
M	source/blender/compositor/operations/COM_PreviewOperation.cpp
M	source/blender/compositor/operations/COM_RenderLayersProg.cpp
M	source/blender/compositor/operations/COM_RenderLayersProg.h
M	source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
M	source/blender/compositor/operations/COM_SplitOperation.cpp
M	source/blender/compositor/operations/COM_TextureOperation.h
M	source/blender/compositor/operations/COM_TrackPositionOperation.cpp
M	source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
M	source/blender/compositor/operations/COM_VectorBlurOperation.cpp
M	source/blender/compositor/operations/COM_VectorCurveOperation.cpp
M	source/blender/compositor/operations/COM_ViewerOperation.cpp
M	source/blender/editors/animation/anim_channels_edit.c
M	source/blender/editors/animation/keyframes_edit.c
M	source/blender/editors/armature/reeb.c
M	source/blender/editors/interface/interface_handlers.c
M	source/blender/editors/mesh/editmesh_knife.c
M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/sculpt_paint/paint_mask.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_undo.c
M	source/blender/editors/space_image/image_draw.c
M	source/blender/editors/space_sequencer/sequencer_scopes.c
M	source/blender/editors/space_view3d/drawanimviz.c
M	source/blender/editors/space_view3d/drawvolume.c
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/editors/uvedit/uvedit_parametrizer.c
M	source/blender/editors/uvedit/uvedit_smart_stitch.c
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/modifiers/intern/MOD_array.c
M	source/blender/modifiers/intern/MOD_ocean.c
M	source/blender/nodes/composite/node_composite_tree.c
M	source/blender/nodes/shader/nodes/node_shader_vectTransform.c
M	source/blender/windowmanager/intern/wm_operators.c
M	source/blender/windowmanager/intern/wm_playanim.c
M	source/gameengine/GamePlayer/ghost/GPG_Application.cpp
M	source/gameengine/SceneGraph/SG_BBox.cpp

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

diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index fcc92b6..c26ff7e 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -2473,9 +2473,9 @@ ParticleInfoNode::ParticleInfoNode()
 	add_output("Age", SHADER_SOCKET_FLOAT);
 	add_output("Lifetime", SHADER_SOCKET_FLOAT);
 	add_output("Location", SHADER_SOCKET_POINT);
-	#if 0	/* not yet supported */
+#if 0	/* not yet supported */
 	add_output("Rotation", SHADER_SOCKET_QUATERNION);
-	#endif
+#endif
 	add_output("Size", SHADER_SOCKET_FLOAT);
 	add_output("Velocity", SHADER_SOCKET_VECTOR);
 	add_output("Angular Velocity", SHADER_SOCKET_VECTOR);
@@ -2491,10 +2491,10 @@ void ParticleInfoNode::attributes(AttributeRequestSet *attributes)
 		attributes->add(ATTR_STD_PARTICLE);
 	if(!output("Location")->links.empty())
 		attributes->add(ATTR_STD_PARTICLE);
-	#if 0	/* not yet supported */
+#if 0	/* not yet supported */
 	if(!output("Rotation")->links.empty())
 		attributes->add(ATTR_STD_PARTICLE);
-	#endif
+#endif
 	if(!output("Size")->links.empty())
 		attributes->add(ATTR_STD_PARTICLE);
 	if(!output("Velocity")->links.empty())
diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
index 7830f42..f63a93e 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
@@ -241,12 +241,12 @@ setCurrentDisplaySetting(
 		}
 
 		if (best_fit != -1) {
-	#  ifdef _DEBUG
+#  ifdef _DEBUG
 			printf("Switching to video mode %dx%d %dx%d %d\n",
 			       vidmodes[best_fit]->hdisplay, vidmodes[best_fit]->vdisplay,
 			       vidmodes[best_fit]->htotal, vidmodes[best_fit]->vtotal,
 			       calculate_rate(vidmodes[best_fit]));
-	#  endif
+#  endif
 
 			/* change to the mode */
 			XF86VidModeSwitchToMode(dpy, scrnum, vidmodes[best_fit]);
diff --git a/intern/ghost/test/gears/GHOST_Test.cpp b/intern/ghost/test/gears/GHOST_Test.cpp
index 6709956..78e5257 100644
--- a/intern/ghost/test/gears/GHOST_Test.cpp
+++ b/intern/ghost/test/gears/GHOST_Test.cpp
@@ -468,7 +468,7 @@ bool Application::processEvent(GHOST_IEvent *event)
 		std::cout << "GHOST_kEventCursorButton"; break;
 	case GHOST_kEventCursorMove:
 		std::cout << "GHOST_kEventCursorMove"; break;
- #endif
+#endif
 		case GHOST_kEventWheel:
 		{
 			GHOST_TEventWheelData *wheelData = (GHOST_TEventWheelData *) event->getData();
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 62aa2da..822e5fb 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -429,9 +429,9 @@ typedef struct {
 static const int g_iCells = 2048;
 
 #ifdef _MSC_VER
-	#define NOINLINE __declspec(noinline)
+#  define NOINLINE __declspec(noinline)
 #else
-	#define NOINLINE __attribute__ ((noinline))
+#  define NOINLINE __attribute__ ((noinline))
 #endif
 
 // it is IMPORTANT that this function is called to evaluate the hash since
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index ffb9278..560bebd 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1436,7 +1436,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
 	int normalDataOffset = ss->normalDataOffset;
 	int vertDataSize = ss->meshIFC.vertDataSize;
 
-	#pragma omp parallel for private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
+#pragma omp parallel for private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
 	for (ptrIdx = 0; ptrIdx < numEffectedF; ptrIdx++) {
 		CCGFace *f = (CCGFace *) effectedF[ptrIdx];
 		int S, x, y;
@@ -1576,7 +1576,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
 		}
 	}
 
-	#pragma omp parallel for private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
+#pragma omp parallel for private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
 	for (ptrIdx = 0; ptrIdx < numEffectedF; ptrIdx++) {
 		CCGFace *f = (CCGFace *) effectedF[ptrIdx];
 		int S, x, y;
@@ -1657,7 +1657,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
 	int vertDataSize = ss->meshIFC.vertDataSize;
 	float *q = ss->q, *r = ss->r;
 
-	#pragma omp parallel for private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
+#pragma omp parallel for private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
 	for (ptrIdx = 0; ptrIdx < numEffectedF; ptrIdx++) {
 		CCGFace *f = (CCGFace *) effectedF[ptrIdx];
 		int S, x, y;
@@ -2004,17 +2004,17 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
 		}
 	}
 
-	#pragma omp parallel private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
+#pragma omp parallel private(ptrIdx) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
 	{
 		float *q, *r;
 
-		#pragma omp critical
+#pragma omp critical
 		{
 			q = MEM_mallocN(ss->meshIFC.vertDataSize, "CCGSubsurf q");
 			r = MEM_mallocN(ss->meshIFC.vertDataSize, "CCGSubsurf r");
 		}
 
-		#pragma omp for schedule(static)
+#pragma omp for schedule(static)
 		for (ptrIdx = 0; ptrIdx < numEffectedF; ptrIdx++) {
 			CCGFace *f = (CCGFace *) effectedF[ptrIdx];
 			int S, x, y;
@@ -2105,7 +2105,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
 			}
 		}
 
-		#pragma omp critical
+#pragma omp critical
 		{
 			MEM_freeN(q);
 			MEM_freeN(r);
@@ -2117,14 +2117,14 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
 	gridSize = ccg_gridsize(nextLvl);
 	cornerIdx = gridSize - 1;
 
-	#pragma omp parallel for private(i) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
+#pragma omp parallel for private(i) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
 	for (i = 0; i < numEffectedE; i++) {
 		CCGEdge *e = effectedE[i];
 		VertDataCopy(EDGE_getCo(e, nextLvl, 0), VERT_getCo(e->v0, nextLvl), ss);
 		VertDataCopy(EDGE_getCo(e, nextLvl, edgeSize - 1), VERT_getCo(e->v1, nextLvl), ss);
 	}
 
-	#pragma omp parallel for private(i) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
+#pragma omp parallel for private(i) if (numEffectedF * edgeSize * edgeSize * 4 >= CCG_OMP_LIMIT)
 	for (i = 0; i < numEffectedF; i++) {
 		CCGFace *f = effectedF[i];
 		int S, x;
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index e95847b..d9447e5 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -2273,10 +2273,10 @@ void CDDM_calc_normals_mapping_ex(DerivedMesh *dm, const short only_face_normals
 	 * no need to duplicate verts.
 	 * WATCH THIS, bmesh only change!,
 	 * need to take care of the side effects here - campbell */
-	#if 0
+#if 0
 	/* we don't want to overwrite any referenced layers */
 	cddm->mvert = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MVERT, dm->numVertData);
-	#endif
+#endif
 
 
 	if (dm->numTessFaceData == 0) {
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index fe9a96d..e2b752e 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -742,14 +742,14 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
 		float min_dim;
 
 		/* calculate canvas dimensions */
-		#pragma omp parallel for schedule(static)
+#pragma omp parallel for schedule(static)
 		for (i = 0; i < sData->total_points; i++) {
-			#ifdef _OPENMP
+#ifdef _OPENMP
 			int id = omp_get_thread_num();
 			boundInsert(&grid_bounds[id], (bData->realCoord[bData->s_pos[i]].v));
-			#else
+#else
 			boundInsert(&grid_bounds[0], (bData->realCoord[bData->s_pos[i]].v));
-			#endif
+#endif
 		}
 
 		/* get final dimensions */
@@ -802,7 +802,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
 
 		if (!error) {
 			/* calculate number of points withing each cell */
-			#pragma omp parallel for schedule(static)
+#pragma omp parallel for schedule(static)
 			for (i = 0; i < sData->total_points; i++) {
 				int co[3], j;
 				for (j = 0; j < 3; j++) {
@@ -811,11 +811,11 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
 				}
 
 				temp_t_index[i] = co[0] + co[1] * grid->dim[0] + co[2] * grid->dim[0] * grid->dim[1];
-				#ifdef _OPENMP
+#ifdef _OPENMP
 				grid->s_num[temp_t_index[i] + omp_get_thread_num() * grid_cells]++;
-				#else
+#else
 				grid->s_num[temp_t_index[i]]++;
-				#endif
+#endif
 			}
 
 			/* for first cell only calc s_num */
@@ -843,7 +843,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
 			/* calculate cell bounds */
 			{
 				int x;
-				#pragma omp parallel for schedule(static)
+#pragma omp parallel for schedule(static)
 				for (x = 0; x < grid->dim[0]; x++) {
 					int y;
 					for (y = 0; y < grid->dim[1]; y++) {
@@ -1471,7 +1471,7 @@ static void dynamicPaint_setInitialColor(Scene *scene, DynamicPaintSurface *surf
 	/* Single color */
 	else if (surface->init_color_type == MOD_DPAINT_INITIAL_COLOR) {
 		/* apply color to every surface point */
-		#pragma omp parallel for schedule(static)
+#pragma omp parallel for schedule(static)
 		for (i = 0; i < sData->total_points; i++) {
 			copy_v3_v3(pPoint[i].color, surface->init_color);
 			pPoint[i].alpha = surface->init_color[3];
@@ -1497,7 +1497,7 @@ static void dynamicPaint_setInitialColor(Scene *scene, DynamicPaintSurface *surf
 		if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) {
 			struct ImagePool *pool = BKE_image_pool_new();
 
-			#pragma omp parallel for schedule(static) shared(pool)
+#pragma omp parallel for schedule(static) shared(pool)
 			for (i = 0; i < numOfFaces; i++) {
 				int numOfVert = (mface[i].v4) ? 4 : 3;
 				float uv[3] = {0.0f};
@@ -1524,7 +1524,7 @@ static void dynamicPaint_setInitialColor(Scene *scene, DynamicPaintSurface *surf
 			ImgSeqFormatData *f_data = (ImgSeqFormatData *)sData->format_data;
 			int samples = (surface->flags & MOD_DPAINT_ANTIALIAS) ? 5 : 1;
 
-			#pragma omp parallel for schedule(static)
+#pragma omp parallel for schedule(static)
 			for (i = 0; i < sData->total_points; i++) {
 				fl

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list