code cleanup: quiet some warnings and style
authorCampbell Barton <ideasman42@gmail.com>
Fri, 5 Apr 2013 15:45:10 +0000 (15:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 5 Apr 2013 15:45:10 +0000 (15:45 +0000)
source/blender/blenkernel/intern/brush.c
source/blender/compositor/nodes/COM_ZCombineNode.cpp
source/blender/compositor/operations/COM_MixHueOperation.cpp
source/blender/compositor/operations/COM_MixSaturationOperation.cpp
source/blender/windowmanager/intern/wm_keymap.c

index 3fbbbc84ef42c93b40b4d539c1d9beddecc618bb..e140bd1a68ac1f2edf4ff8ab860b9637eb7fa04a 100644 (file)
@@ -541,9 +541,9 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br,
                        y = flen * sinf(angle);
                }
 
-               if (fabs(x) > br->stencil_dimension[0] || fabs(y) > br->stencil_dimension[1]) {
-                       rgba[0] = rgba[1] = rgba[2] = rgba[3] = 0.0;
-                       return 0.0;
+               if (fabsf(x) > br->stencil_dimension[0] || fabsf(y) > br->stencil_dimension[1]) {
+                       zero_v4(rgba);
+                       return 0.0f;
                }
                x /= (br->stencil_dimension[0]);
                y /= (br->stencil_dimension[1]);
index 35eedf435f6ed00b5f7f01e6e1da71e5a34415ca..82effaf0eda2d7fa30cd14e787f47146233a6589 100644 (file)
@@ -67,7 +67,8 @@ void ZCombineNode::convertToOperations(ExecutionSystem *system, CompositorContex
                                system->addOperation(zoperation);
                        }
                }
-       } else {
+       }
+       else {
                // not full anti alias, use masking for Z combine. be aware it uses anti aliasing.
                // step 1 create mask
                MathGreaterThanOperation *maskoperation = new MathGreaterThanOperation();
index 1fa393bb362d869ebff7f550b4f3858f9985f8cd..8f898cf8ecff77854a19f2568c98319c5d087ec4 100644 (file)
@@ -56,7 +56,8 @@ void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampl
                output[0] = valuem * (inputColor1[0]) + value * tmpr;
                output[1] = valuem * (inputColor1[1]) + value * tmpg;
                output[2] = valuem * (inputColor1[2]) + value * tmpb;
-       } else {
+       }
+       else {
                        copy_v3_v3(output, inputColor1);
        }
        output[3] = inputColor1[3];
index 69207d7fbaab30bfaf82f3e7b09017af79a82f9e..3ab19748458e07bccf14422135ad34d391d77023 100644 (file)
@@ -52,7 +52,8 @@ void MixSaturationOperation::executePixel(float output[4], float x, float y, Pix
                float colH, colS, colV;
                rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
                hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
-       } else {
+       }
+       else {
                copy_v3_v3(output, inputColor1);
        }
 
index aa9af4af154ceb60252247e26e2b5e742647a2c4..f06bae1d084307915bee28ff2113ddd613609cca 100644 (file)
@@ -964,10 +964,12 @@ static wmKeyMapItem *wm_keymap_item_find(
                        RNA_pointer_create(NULL, ot->srna, properties_default, &opptr);
 
                        if (WM_operator_properties_default(&opptr, true) ||
-                           (ot->prop && RNA_property_is_set(&opptr, ot->prop))) {
+                           (ot->prop && RNA_property_is_set(&opptr, ot->prop)))
+                       {
                                /* for operator that has enum menu, unset it so it always matches */
-                               if (ot->prop)
+                               if (ot->prop) {
                                        RNA_property_unset(&opptr, ot->prop);
+                               }
 
                                found = wm_keymap_item_find_props(C, opname, opcontext, properties_default, 0, hotkey, keymap_r);
                        }