[Bf-blender-cvs] [a54bdd76cb3] master: ClangFormat: format '#if 0' code
Campbell Barton
noreply at git.blender.org
Wed Apr 17 08:53:50 CEST 2019
Commit: a54bdd76cb34005d07a65c2c3a8198b7b8e8c95a
Author: Campbell Barton
Date: Wed Apr 17 08:50:46 2019 +0200
Branches: master
https://developer.blender.org/rBa54bdd76cb34005d07a65c2c3a8198b7b8e8c95a
ClangFormat: format '#if 0' code
Previous cleanups didn't account for space after '#'.
===================================================================
M intern/guardedalloc/intern/mmap_win.c
M source/blender/blenkernel/intern/mesh_runtime.c
M source/blender/blenkernel/intern/smoke.c
M source/blender/blenkernel/intern/sound.c
M source/blender/bmesh/intern/bmesh_polygon.c
M source/blender/bmesh/operators/bmo_inset.c
M source/blender/compositor/intern/COM_Debug.cpp
M source/blender/editors/interface/interface_icons.c
M source/blender/editors/interface/interface_ops.c
M source/blender/editors/physics/physics_fluid.c
M source/blender/editors/space_text/text_ops.c
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/gpu/intern/gpu_context.cpp
M source/blender/makesrna/intern/rna_cloth.c
M source/blender/makesrna/intern/rna_curve.c
M source/blender/makesrna/intern/rna_fcurve.c
M source/blender/makesrna/intern/rna_gpencil_modifier.c
M source/blender/makesrna/intern/rna_mesh.c
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/makesrna/intern/rna_nodetree.c
M source/blender/makesrna/intern/rna_object.c
M source/blender/makesrna/intern/rna_object_api.c
M source/blender/makesrna/intern/rna_object_force.c
M source/blender/makesrna/intern/rna_pose.c
M source/blender/makesrna/intern/rna_rna.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/makesrna/intern/rna_sequencer.c
M source/blender/makesrna/intern/rna_ui.c
M source/blender/makesrna/intern/rna_ui_api.c
M source/blender/makesrna/intern/rna_userdef.c
M source/blender/modifiers/intern/MOD_ocean.c
M source/blender/physics/intern/BPH_mass_spring.cpp
M source/blender/physics/intern/implicit_blender.c
M source/blender/physics/intern/implicit_eigen.cpp
M source/creator/creator.c
M source/creator/creator_args.c
===================================================================
diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c
index d5488351700..331d67aa55a 100644
--- a/intern/guardedalloc/intern/mmap_win.c
+++ b/intern/guardedalloc/intern/mmap_win.c
@@ -98,8 +98,8 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
}
# if 0
- if ( fd == -1 ) {
- _set_errno( EBADF );
+ if (fd == -1) {
+ _set_errno(EBADF);
return MAP_FAILED;
}
# endif
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c
index dea64e64377..8d482a961b6 100644
--- a/source/blender/blenkernel/intern/mesh_runtime.c
+++ b/source/blender/blenkernel/intern/mesh_runtime.c
@@ -285,9 +285,15 @@ char *BKE_mesh_runtime_debug_info(Mesh *me_eval)
# if 0
const char *tstr;
switch (me_eval->type) {
- case DM_TYPE_CDDM: tstr = "DM_TYPE_CDDM"; break;
- case DM_TYPE_CCGDM: tstr = "DM_TYPE_CCGDM"; break;
- default: tstr = "UNKNOWN"; break;
+ case DM_TYPE_CDDM:
+ tstr = "DM_TYPE_CDDM";
+ break;
+ case DM_TYPE_CCGDM:
+ tstr = "DM_TYPE_CCGDM";
+ break;
+ default:
+ tstr = "UNKNOWN";
+ break;
}
BLI_dynstr_appendf(dynstr, " 'type': '%s',\n", tstr);
# endif
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 23cdf802c81..50c72f5a57f 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2453,7 +2453,7 @@ static void update_flowsfluids(
EmissionMap em_temp = {NULL};
float sample_size = 1.0f / (float)(subframes + 1);
# if 0
- float prev_frame_pos = sample_size * (float)(subframe+1);
+ float prev_frame_pos = sample_size * (float)(subframe + 1);
# endif
float sdt = dt * sample_size;
int hires_multiplier = 1;
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 383542fa335..b521aa2f954 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -391,27 +391,26 @@ void BKE_sound_load(struct Main *bmain, bSound *sound)
/* XXX unused currently */
# if 0
- switch (sound->type)
- {
+ switch (sound->type) {
case SOUND_TYPE_FILE:
# endif
- {
- char fullpath[FILE_MAX];
-
- /* load sound */
- PackedFile *pf = sound->packedfile;
-
- /* don't modify soundact->sound->name, only change a copy */
- BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
- BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id));
-
- /* but we need a packed file then */
- if (pf)
- sound->handle = AUD_Sound_bufferFile((unsigned char *)pf->data, pf->size);
- /* or else load it from disk */
- else
- sound->handle = AUD_Sound_file(fullpath);
- }
+ {
+ char fullpath[FILE_MAX];
+
+ /* load sound */
+ PackedFile *pf = sound->packedfile;
+
+ /* don't modify soundact->sound->name, only change a copy */
+ BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
+ BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id));
+
+ /* but we need a packed file then */
+ if (pf)
+ sound->handle = AUD_Sound_bufferFile((unsigned char *)pf->data, pf->size);
+ /* or else load it from disk */
+ else
+ sound->handle = AUD_Sound_file(fullpath);
+ }
/* XXX unused currently */
# if 0
break;
@@ -426,23 +425,23 @@ void BKE_sound_load(struct Main *bmain, bSound *sound)
break;
}
# endif
- if (sound->flags & SOUND_FLAGS_MONO) {
- void *handle = AUD_Sound_rechannel(sound->handle, AUD_CHANNELS_MONO);
- AUD_Sound_free(sound->handle);
- sound->handle = handle;
- }
+ if (sound->flags & SOUND_FLAGS_MONO) {
+ void *handle = AUD_Sound_rechannel(sound->handle, AUD_CHANNELS_MONO);
+ AUD_Sound_free(sound->handle);
+ sound->handle = handle;
+ }
- if (sound->flags & SOUND_FLAGS_CACHING) {
- sound->cache = AUD_Sound_cache(sound->handle);
- }
+ if (sound->flags & SOUND_FLAGS_CACHING) {
+ sound->cache = AUD_Sound_cache(sound->handle);
+ }
- if (sound->cache)
- sound->playback_handle = sound->cache;
- else
- sound->playback_handle = sound->handle;
+ if (sound->cache)
+ sound->playback_handle = sound->cache;
+ else
+ sound->playback_handle = sound->handle;
- BKE_sound_update_sequencer(bmain, sound);
- }
+ BKE_sound_update_sequencer(bmain, sound);
+}
}
AUD_Device *BKE_sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume)
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 6f363e51b49..3f2c93f570e 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -1432,7 +1432,8 @@ void BM_mesh_calc_tessellation(BMesh *bm, BMLoop *(*looptris)[3], int *r_looptri
else if (efa->len == 3) {
# if 0
int j;
- BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, j) {
+ BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, j)
+ {
looptris[i][j] = l;
}
i += 1;
@@ -1450,7 +1451,8 @@ void BM_mesh_calc_tessellation(BMesh *bm, BMLoop *(*looptris)[3], int *r_looptri
BMLoop *ltmp[4];
int j;
BLI_array_grow_items(looptris, 2);
- BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, j) {
+ BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, j)
+ {
ltmp[j] = l;
}
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index 724b974c50f..0bb81779ed0 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -190,10 +190,9 @@ static void bm_loop_customdata_merge(BMesh *bm,
# if 0
&&
/* check if the data ends up diverged */
- (CustomData_data_equals(
- type,
- BM_ELEM_CD_GET_VOID_P(l_a_inner, offset),
- BM_ELEM_CD_GET_VOID_P(l_b_inner, offset)) == false)
+ (CustomData_data_equals(type,
+ BM_ELEM_CD_GET_VOID_P(l_a_inner, offset),
+ BM_ELEM_CD_GET_VOID_P(l_b_inner, offset)) == false)
# endif
) {
/* no need to allocate a temp block:
diff --git a/source/blender/compositor/intern/COM_Debug.cpp b/source/blender/compositor/intern/COM_Debug.cpp
index 67ac350de83..b977154db1a 100644
--- a/source/blender/compositor/intern/COM_Debug.cpp
+++ b/source/blender/compositor/intern/COM_Debug.cpp
@@ -315,10 +315,13 @@ bool DebugInfo::graphviz_system(const ExecutionSystem *system, char *str, int ma
# if 0
for (ExecutionSystem::Operations::const_iterator it = system->m_operations.begin();
- it != system->m_operations.end(); ++it)
- {
+ it != system->m_operations.end();
+ ++it) {
NodeOperation *op = *it;
- len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// OPERATION: %s\r\n", node->getbNode()->typeinfo->ui_name);
+ len += snprintf(str + len,
+ maxlen > len ? maxlen - len : 0,
+ "// OPERATION: %s\r\n",
+ node->getbNode()->typeinfo->ui_name);
}
# endif
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 3ab6f9aa5e9..4b66461e186 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -731,9 +731,11 @@ static void init_internal_icons(void)
bbuf = IMB_loadiffname(iconfilestr, IB_rect, NULL);
if (bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) {
- printf("\n***WARNING***\n"
- "Icons file '%s' too small.\n"
- "Using built-in Icons instead\n", iconfilestr);
+ printf(
+ "\n***WARNING***\n"
+ "Icons file '%s' too small.\n"
+ "Using built-in Icons instead\n",
+ iconfilestr);
IMB_freeImBuf(bbuf);
bbuf = NULL;
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 537a1d4c851..768cc32aeb5 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1125,8 +1125,7 @@ static void ui_editsource_active_but_clear(void)
static bool ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
{
# if 0
- printf("matching buttons: '%s' == '%s'\n",
- but_a->drawstr, but_b->drawstr);
+ printf("matching buttons: '%s' == '%s'\n", but_a->drawstr, but_b->drawstr);
# endif
/* this just needs to be a 'good-enough' comparison so we can know beyond
@@ -1153,8 +1152,7 @@ void UI_editsource_active_but_test(uiBut *but)
int lineno = -1;
# if 0
- printf("comparing buttons: '%s' == '%s'\n",
- but->drawstr, ui_editsource_info->but_orig.drawstr);
+ printf("comparing buttons: '%s' == '%s'\n", but->drawstr, ui_editsource_info->but_orig.drawstr);
# endif
PyC_FileAndNum_Safe(&fn, &lineno);
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 2769d1a9dc3..65fb58efe6d 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -185,16 +185,18 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char
}
fprintf(file, " CHANNEL %s =\n", str);
- for (i=0; i < channelSize; i++) {
+ for (i = 0; i < channelSize; i++) {
fprintf(file, " ");
- for (j=0;j <= entries;j++) { // also print time value
- fprintf(file, " %f ", channel[i*(entries + 1) + j]);
- if (j == entries-1) { fprintf(file, " "); }
+ for (j = 0; j <= entries; j++) { // also print time value
+ fprintf(file, " %f ", channel[i * (entries + 1) + j]);
+ if (j == entries - 1) {
+ fprintf(file, " ");
+ }
}
fprintf(file, "\n");
}
- fprintf(file, " ;\n");
+ fprintf(
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list