Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 Feb 2018 00:13:54 +0000 (11:13 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Feb 2018 00:13:54 +0000 (11:13 +1100)
source/blender/blenkernel/intern/addon.c
source/blender/blenlib/BLI_hash.h
source/blender/blenlib/intern/math_base_inline.c
source/blender/nodes/shader/nodes/node_shader_displacement.c
source/blender/nodes/shader/nodes/node_shader_vector_displacement.c

index 8a5154f00392dd42ee4ac71849bd6c9560edeaac..689e0fb5ee62b3d14a7384e18e924a9cb74b0401 100644 (file)
@@ -33,7 +33,6 @@
 #include "BLI_ghash.h"
 #include "BLI_string.h"
 #include "BLI_listbase.h"
-#include "BLI_utildefines.h"
 
 #include "BKE_addon.h"  /* own include */
 #include "BKE_idprop.h"
index 8b7978207220e1c4e4bbd82dbccef88575bae70b..fa79481e25cbc87b3c25fc82dc22ac2669770b39 100644 (file)
@@ -65,7 +65,7 @@ BLI_INLINE unsigned int BLI_hash_int(unsigned int k)
 
 BLI_INLINE float BLI_hash_int_01(unsigned int k)
 {
-       return (float)BLI_hash_int(k) * (1.0f/(float)0xFFFFFFFF);
+       return (float)BLI_hash_int(k) * (1.0f / (float)0xFFFFFFFF);
 }
 
 #endif // __BLI_HASH_H__
index 144198f2c065e3161806262069fc852135f1a829..1f517471407ef272d628b6bd8e48d22b1081bdc3 100644 (file)
@@ -333,7 +333,8 @@ MINLINE float clamp_f(float value, float min, float max)
 {
        if (value > max) {
                return max;
-       } else if (value < min) {
+       }
+       else if (value < min) {
                return min;
        }
        return value;
index e976eaf143acb58b0adbe0df9dc9590217f45e2c..e259a9e3f6d2fa85cfd3a95256be1ae93a6ce241 100644 (file)
@@ -60,7 +60,7 @@ static int gpu_shader_displacement(GPUMaterial *mat, bNode *node, bNodeExecData
                GPU_link(mat, "direction_transform_m4v3", GPU_builtin(GPU_VIEW_NORMAL), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), &in[3].link);
        }
 
-       if(node->custom1 == SHD_SPACE_OBJECT) {
+       if (node->custom1 == SHD_SPACE_OBJECT) {
                return GPU_stack_link(mat, "node_displacement_object", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
        }
        else {
index c40377c3d59ca4e3ea2a7bfac8673c8f03318fff..073bc3110f6f525935dd2db28b537b666e3c0b76 100644 (file)
@@ -48,7 +48,7 @@ static void node_shader_init_vector_displacement(bNodeTree *UNUSED(ntree), bNode
 
 static int gpu_shader_vector_displacement(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
 {
-       if(node->custom1 == SHD_SPACE_TANGENT) {
+       if (node->custom1 == SHD_SPACE_TANGENT) {
                return GPU_stack_link(mat,
                                      "node_vector_displacement_tangent",
                                      in,
@@ -58,7 +58,7 @@ static int gpu_shader_vector_displacement(GPUMaterial *mat, bNode *node, bNodeEx
                                      GPU_builtin(GPU_OBJECT_MATRIX),
                                      GPU_builtin(GPU_VIEW_MATRIX));
        }
-       else if(node->custom1 == SHD_SPACE_OBJECT) {
+       else if (node->custom1 == SHD_SPACE_OBJECT) {
                return GPU_stack_link(mat, "node_vector_displacement_object", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
        }
        else {