Cleanup: style

This commit is contained in:
Campbell Barton 2018-08-26 19:57:19 +10:00
parent 82f771b169
commit 56ec606413
6 changed files with 11 additions and 13 deletions

View File

@ -535,7 +535,7 @@ void BKE_brush_update_material(Main *bmain, Material *ma, Brush *exclude_brush)
if (brush->gpencil_settings != NULL) {
BrushGpencilSettings *gpencil_settings = brush->gpencil_settings;
if (((gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED) == 0) &&
(gpencil_settings->material != ma))
(gpencil_settings->material != ma))
{
gpencil_settings->material = ma;
}

View File

@ -956,17 +956,15 @@ static void curvemapping_evaluateRGBF_filmlike(const CurveMapping *cumap, float
static float curvemapping_weighted_standard_triangle(float a, float b, float a1)
{
if (a != b)
{
if (a != b) {
float b1;
float a2 = a1 - a;
if (b < a)
{
b1 = b + a2 * b / a ;
if (b < a) {
b1 = b + a2 * b / a ;
}
else {
b1 = b + a2 * (65535.f - b) / (65535.f - a);
b1 = b + a2 * (65535.0f - b) / (65535.0f - a);
}
return b1;
@ -992,8 +990,7 @@ void curvemapping_evaluate_premulRGBF_ex(
const float g = (vecin[1] - black[1]) * bwmul[1];
const float b = (vecin[2] - black[2]) * bwmul[2];
switch (cumap->tone)
{
switch (cumap->tone) {
default:
case CURVE_TONE_STANDARD:
{

View File

@ -143,7 +143,7 @@ DepsgraphNodeBuilder::DepsgraphNodeBuilder(Main *bmain, Depsgraph *graph)
view_layer_(NULL),
view_layer_index_(-1),
collection_(NULL),
is_parent_collection_visible_(true),
is_parent_collection_visible_(true),
cow_id_hash_(NULL)
{
}

View File

@ -89,7 +89,7 @@ bool stat_entry_comparator(const StatsEntry& a, const StatsEntry& b)
string gnuplotify_id_code(const string& name)
{
return string("") + name[0] + name [1];
return string("") + name[0] + name[1];
}
string gnuplotify_name(const string& name)

View File

@ -383,7 +383,7 @@ void GPENCIL_cache_init(void *vedata)
{
if (((obact_gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) &&
(obact_gpd->runtime.sbuffer_size > 0) &&
((obact_gpd->flag & GP_DATA_STROKE_POLYGON) == 0))
((obact_gpd->flag & GP_DATA_STROKE_POLYGON) == 0))
{
stl->g_data->session_flag |= GP_DRW_PAINT_PAINTING;
}

View File

@ -270,7 +270,8 @@ static bool gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2])
}
/* reproject the points of the stroke to a plane locked to axis to avoid stroke offset */
static void gp_project_points_to_plane(RegionView3D *rv3d, bGPDstroke *gps, const float origin[3], const int axis)
static void UNUSED_FUNCTION(gp_project_points_to_plane)(
RegionView3D *rv3d, bGPDstroke *gps, const float origin[3], const int axis)
{
float plane_normal[3];
float vn[3];