diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp index ed5d5235a34..c5edc7c9be3 100644 --- a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp +++ b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp @@ -47,36 +47,35 @@ CCL_NAMESPACE_BEGIN using namespace OSL; class DiffuseRampClosure : public CBSDFClosure { -public: - DiffuseRampBsdf params; - Color3 colors[8]; + public: + DiffuseRampBsdf params; + Color3 colors[8]; - void setup(ShaderData *sd, int /* path_flag */, float3 weight) - { - DiffuseRampBsdf *bsdf = (DiffuseRampBsdf*)bsdf_alloc_osl(sd, sizeof(DiffuseRampBsdf), weight, ¶ms); + void setup(ShaderData *sd, int /* path_flag */, float3 weight) + { + DiffuseRampBsdf *bsdf = (DiffuseRampBsdf *)bsdf_alloc_osl( + sd, sizeof(DiffuseRampBsdf), weight, ¶ms); - if(bsdf) { - bsdf->colors = (float3*)closure_alloc_extra(sd, sizeof(float3)*8); + if (bsdf) { + bsdf->colors = (float3 *)closure_alloc_extra(sd, sizeof(float3) * 8); - if(bsdf->colors) { - for(int i = 0; i < 8; i++) - bsdf->colors[i] = TO_FLOAT3(colors[i]); + if (bsdf->colors) { + for (int i = 0; i < 8; i++) + bsdf->colors[i] = TO_FLOAT3(colors[i]); - sd->flag |= bsdf_diffuse_ramp_setup(bsdf); - } - } - } + sd->flag |= bsdf_diffuse_ramp_setup(bsdf); + } + } + } }; ClosureParam *closure_bsdf_diffuse_ramp_params() { - static ClosureParam params[] = { - CLOSURE_FLOAT3_PARAM(DiffuseRampClosure, params.N), - CLOSURE_COLOR_ARRAY_PARAM(DiffuseRampClosure, colors, 8), - CLOSURE_STRING_KEYPARAM(DiffuseRampClosure, label, "label"), - CLOSURE_FINISH_PARAM(DiffuseRampClosure) - }; - return params; + static ClosureParam params[] = {CLOSURE_FLOAT3_PARAM(DiffuseRampClosure, params.N), + CLOSURE_COLOR_ARRAY_PARAM(DiffuseRampClosure, colors, 8), + CLOSURE_STRING_KEYPARAM(DiffuseRampClosure, label, "label"), + CLOSURE_FINISH_PARAM(DiffuseRampClosure)}; + return params; } CCLOSURE_PREPARE(closure_bsdf_diffuse_ramp_prepare, DiffuseRampClosure) |