Cleanup: line breaks with comments

This commit is contained in:
2019-09-12 18:58:43 +10:00
parent 1e2f2f27e9
commit a22c2ceb0f
11 changed files with 90 additions and 86 deletions

View File

@@ -42,8 +42,8 @@ AviError AVI_set_compress_option(
(void)stream; /* unused */ (void)stream; /* unused */
if (movie->header->TotalFrames != if (movie->header->TotalFrames != 0) {
0) { /* Can't change params after we have already started writing frames */ /* Can't change params after we have already started writing frames. */
return AVI_ERROR_OPTION; return AVI_ERROR_OPTION;
} }

View File

@@ -2145,8 +2145,8 @@ static void tilt_bezpart(BezTriple *prevbezt,
for (a = 0; a < resolu; a++, fac += dfac) { for (a = 0; a < resolu; a++, fac += dfac) {
if (tilt_array) { if (tilt_array) {
if (nu->tilt_interp == if (nu->tilt_interp == KEY_CU_EASE) {
KEY_CU_EASE) { /* May as well support for tilt also 2.47 ease interp */ /* May as well support for tilt also 2.47 ease interp. */
*tilt_array = prevbezt->tilt + *tilt_array = prevbezt->tilt +
(bezt->tilt - prevbezt->tilt) * (3.0f * fac * fac - 2.0f * fac * fac * fac); (bezt->tilt - prevbezt->tilt) * (3.0f * fac * fac - 2.0f * fac * fac * fac);
} }

View File

@@ -265,9 +265,11 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob,
const float *data; const float *data;
int a, b, ofs, vertcount, startvert, totvert = 0, totedge = 0, totloop = 0, totpoly = 0; int a, b, ofs, vertcount, startvert, totvert = 0, totedge = 0, totloop = 0, totpoly = 0;
int p1, p2, p3, p4, *index; int p1, p2, p3, p4, *index;
const bool conv_polys = ((CU_DO_2DFILL(cu) == const bool conv_polys = (
false) || /* 2d polys are filled with DL_INDEX3 displists */ /* 2d polys are filled with DL_INDEX3 displists */
(ob->type == OB_SURF)); /* surf polys are never filled */ (CU_DO_2DFILL(cu) == false) ||
/* surf polys are never filled */
(ob->type == OB_SURF));
/* count */ /* count */
dl = dispbase->first; dl = dispbase->first;

View File

@@ -5339,8 +5339,8 @@ static void lib_link_object(FileData *fd, Main *main)
eModifierType_Smoke); eModifierType_Smoke);
if (smd && (smd->type == MOD_SMOKE_TYPE_DOMAIN) && smd->domain) { if (smd && (smd->type == MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
smd->domain->flags |= /* Flag for refreshing the simulation after loading. */
MOD_SMOKE_FILE_LOAD; /* flag for refreshing the simulation after loading */ smd->domain->flags |= MOD_SMOKE_FILE_LOAD;
} }
} }

View File

@@ -1026,8 +1026,8 @@ bool BM_select_history_active_get(BMesh *bm, BMEditSelection *ese)
ese->next = ese->prev = NULL; ese->next = ese->prev = NULL;
if (ese_last) { if (ese_last) {
if (ese_last->htype == /* If there is an active face, use it over the last selected face. */
BM_FACE) { /* if there is an active face, use it over the last selected face */ if (ese_last->htype == BM_FACE) {
if (efa) { if (efa) {
ese->ele = (BMElem *)efa; ese->ele = (BMElem *)efa;
} }

View File

@@ -239,8 +239,8 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
g_context = NULL; g_context = NULL;
g_program = NULL; g_program = NULL;
if (clewInit() != /* This will check for errors and skip if already initialized. */
CLEW_SUCCESS) { /* this will check for errors and skip if already initialized */ if (clewInit() != CLEW_SUCCESS) {
return; return;
} }

View File

@@ -629,8 +629,8 @@ static char *rna_def_property_get_func(
if (prop->type == PROP_FLOAT) { if (prop->type == PROP_FLOAT) {
if (IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) { if (IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
if (prop->subtype != /* Colors are an exception. these get translated. */
PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */ if (prop->subtype != PROP_COLOR_GAMMA) {
CLOG_ERROR(&LOG, CLOG_ERROR(&LOG,
"%s.%s is a '%s' but wrapped as type '%s'.", "%s.%s is a '%s' but wrapped as type '%s'.",
srna->identifier, srna->identifier,

View File

@@ -2445,8 +2445,8 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
/* silent is for internal use */ /* silent is for internal use */
if (DefRNA.silent == 0) { if (DefRNA.silent == 0) {
if (dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) { if (dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
if (prop->subtype != /* Colors are an exception. these get translated. */
PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */ if (prop->subtype != PROP_COLOR_GAMMA) {
CLOG_ERROR(&LOG, CLOG_ERROR(&LOG,
"%s.%s is a '%s' but wrapped as type '%s'.", "%s.%s is a '%s' but wrapped as type '%s'.",
srna->identifier, srna->identifier,

View File

@@ -65,8 +65,8 @@ static void requiredDataMask(Object *UNUSED(ob),
if ((smd->shrinkType == MOD_SHRINKWRAP_PROJECT) && if ((smd->shrinkType == MOD_SHRINKWRAP_PROJECT) &&
(smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)) { (smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)) {
r_cddata_masks->vmask |= /* XXX Really? These should always be present, always... */
CD_MASK_MVERT; /* XXX Really? These should always be present, always... */ r_cddata_masks->vmask |= CD_MASK_MVERT;
} }
} }

View File

@@ -165,11 +165,12 @@ static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short th
tex->ns_outscale = tex_input_value(in[I + 4], p, thread); tex->ns_outscale = tex_input_value(in[I + 4], p, thread);
tex->noisesize = tex_input_value(in[I + 5], p, thread); tex->noisesize = tex_input_value(in[I + 5], p, thread);
} }
ProcDef(voronoi) ProcDef(voronoi);
/* --- BLEND -- */ /* --- BLEND -- */
static bNodeSocketTemplate blend_inputs[] = {COMMON_INPUTS, {-1, 0, ""}}; static bNodeSocketTemplate blend_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
ProcNoInputs(blend) ProcDef(blend) ProcNoInputs(blend);
ProcDef(blend);
/* -- MAGIC -- */ /* -- MAGIC -- */
static bNodeSocketTemplate magic_inputs[] = { static bNodeSocketTemplate magic_inputs[] = {
@@ -180,7 +181,7 @@ static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thre
{ {
tex->turbul = tex_input_value(in[I + 0], p, thread); tex->turbul = tex_input_value(in[I + 0], p, thread);
} }
ProcDef(magic) ProcDef(magic);
/* --- MARBLE --- */ /* --- MARBLE --- */
static bNodeSocketTemplate marble_inputs[] = { static bNodeSocketTemplate marble_inputs[] = {
@@ -193,7 +194,7 @@ static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
tex->noisesize = tex_input_value(in[I + 0], p, thread); tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->turbul = tex_input_value(in[I + 1], p, thread); tex->turbul = tex_input_value(in[I + 1], p, thread);
} }
ProcDef(marble) ProcDef(marble);
/* --- CLOUDS --- */ /* --- CLOUDS --- */
static bNodeSocketTemplate clouds_inputs[] = { static bNodeSocketTemplate clouds_inputs[] = {
@@ -204,7 +205,7 @@ static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
{ {
tex->noisesize = tex_input_value(in[I + 0], p, thread); tex->noisesize = tex_input_value(in[I + 0], p, thread);
} }
ProcDef(clouds) ProcDef(clouds);
/* --- DISTORTED NOISE --- */ /* --- DISTORTED NOISE --- */
static bNodeSocketTemplate distnoise_inputs[] = { static bNodeSocketTemplate distnoise_inputs[] = {
@@ -217,7 +218,7 @@ static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short
tex->noisesize = tex_input_value(in[I + 0], p, thread); tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->dist_amount = tex_input_value(in[I + 1], p, thread); tex->dist_amount = tex_input_value(in[I + 1], p, thread);
} }
ProcDef(distnoise) ProcDef(distnoise);
/* --- WOOD --- */ /* --- WOOD --- */
static bNodeSocketTemplate wood_inputs[] = { static bNodeSocketTemplate wood_inputs[] = {
@@ -230,7 +231,7 @@ static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short threa
tex->noisesize = tex_input_value(in[I + 0], p, thread); tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->turbul = tex_input_value(in[I + 1], p, thread); tex->turbul = tex_input_value(in[I + 1], p, thread);
} }
ProcDef(wood) ProcDef(wood);
/* --- MUSGRAVE --- */ /* --- MUSGRAVE --- */
static bNodeSocketTemplate musgrave_inputs[] = { static bNodeSocketTemplate musgrave_inputs[] = {
@@ -250,11 +251,12 @@ static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short t
tex->ns_outscale = tex_input_value(in[I + 3], p, thread); tex->ns_outscale = tex_input_value(in[I + 3], p, thread);
tex->noisesize = tex_input_value(in[I + 4], p, thread); tex->noisesize = tex_input_value(in[I + 4], p, thread);
} }
ProcDef(musgrave) ProcDef(musgrave);
/* --- NOISE --- */ /* --- NOISE --- */
static bNodeSocketTemplate noise_inputs[] = {COMMON_INPUTS, {-1, 0, ""}}; static bNodeSocketTemplate noise_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
ProcNoInputs(noise) ProcDef(noise) ProcNoInputs(noise);
ProcDef(noise);
/* --- STUCCI --- */ /* --- STUCCI --- */
static bNodeSocketTemplate stucci_inputs[] = { static bNodeSocketTemplate stucci_inputs[] = {
@@ -267,7 +269,7 @@ static void stucci_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
tex->noisesize = tex_input_value(in[I + 0], p, thread); tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->turbul = tex_input_value(in[I + 1], p, thread); tex->turbul = tex_input_value(in[I + 1], p, thread);
} }
ProcDef(stucci) ProcDef(stucci);
/* --- */ /* --- */
@@ -303,9 +305,9 @@ ProcDef(stucci)
#define C outputs_color_only #define C outputs_color_only
#define CV outputs_both #define CV outputs_both
TexDef(TEX_VORONOI, CV, voronoi, "Voronoi") TexDef(TEX_BLEND, C, blend, "Blend") TexDef(TEX_VORONOI, CV, voronoi, "Voronoi") TexDef(TEX_BLEND, C, blend, "Blend");
TexDef(TEX_MAGIC, C, magic, "Magic") TexDef(TEX_MARBLE, CV, marble, "Marble") TexDef(TEX_MAGIC, C, magic, "Magic") TexDef(TEX_MARBLE, CV, marble, "Marble");
TexDef(TEX_CLOUDS, CV, clouds, "Clouds") TexDef(TEX_WOOD, CV, wood, "Wood") TexDef(TEX_CLOUDS, CV, clouds, "Clouds") TexDef(TEX_WOOD, CV, wood, "Wood");
TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave") TexDef(TEX_NOISE, C, noise, "Noise") TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave") TexDef(TEX_NOISE, C, noise, "Noise");
TexDef(TEX_STUCCI, CV, stucci, "Stucci") TexDef(TEX_STUCCI, CV, stucci, "Stucci");
TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise") TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise");

View File

@@ -227,8 +227,8 @@ void wm_operatortype_free(void)
*/ */
void WM_operatortype_props_advanced_begin(wmOperatorType *ot) void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
{ {
if (ot_prop_basic_count == if (ot_prop_basic_count == -1) {
-1) { /* Don't do anything if _begin was called before, but not _end */ /* Don't do anything if _begin was called before, but not _end */
ot_prop_basic_count = RNA_struct_count_properties(ot->srna); ot_prop_basic_count = RNA_struct_count_properties(ot->srna);
} }
} }