Cycles: Cleanup, code style
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 15 Nov 2018 16:16:40 +0000 (17:16 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 15 Nov 2018 16:16:40 +0000 (17:16 +0100)
intern/cycles/kernel/bvh/bvh.h
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/svm/svm_closure.h

index 72bba8d968ffdc589d62150e6e2d2f19f9d939b6..6708a3efac12da6151cd65ec03768e7de19e5632 100644 (file)
@@ -186,7 +186,7 @@ ccl_device_intersect bool scene_intersect(KernelGlobals *kg,
                                           float difl,
                                           float extmax)
 {
-       if (!scene_intersect_valid(&ray)) {
+       if(!scene_intersect_valid(&ray)) {
                return false;
        }
 #ifdef __EMBREE__
@@ -248,7 +248,7 @@ ccl_device_intersect bool scene_intersect_local(KernelGlobals *kg,
                                                 uint *lcg_state,
                                                 int max_hits)
 {
-       if (!scene_intersect_valid(&ray)) {
+       if(!scene_intersect_valid(&ray)) {
                return false;
        }
 #ifdef __EMBREE__
@@ -327,7 +327,7 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
                                                      uint max_hits,
                                                      uint *num_hits)
 {
-       if (!scene_intersect_valid(ray)) {
+       if(!scene_intersect_valid(ray)) {
                return false;
        }
 #  ifdef __EMBREE__
@@ -407,7 +407,7 @@ ccl_device_intersect bool scene_intersect_volume(KernelGlobals *kg,
                                                  Intersection *isect,
                                                  const uint visibility)
 {
-       if (!scene_intersect_valid(ray)) {
+       if(!scene_intersect_valid(ray)) {
                return false;
        }
 #  ifdef __OBJECT_MOTION__
@@ -438,7 +438,7 @@ ccl_device_intersect uint scene_intersect_volume_all(KernelGlobals *kg,
                                                      const uint max_hits,
                                                      const uint visibility)
 {
-       if (!scene_intersect_valid(ray)) {
+       if(!scene_intersect_valid(ray)) {
                return false;
        }
 #  ifdef __EMBREE__
index 5a82748f345ab345d93504cdecd3bf3a37e8c431..97f97a4887eb2d6fe768112660a5af0d027ece11 100644 (file)
@@ -886,7 +886,7 @@ bool OSLRenderServices::has_userdata(ustring name, TypeDesc type, OSL::ShaderGlo
 
 TextureSystem::TextureHandle *OSLRenderServices::get_texture_handle(ustring filename)
 {
-       if (filename.length() && filename[0] == '@') {
+       if(filename.length() && filename[0] == '@') {
                /* Dummy, we don't use texture handles for builtin textures but need
                 * to tell the OSL runtime optimizer that this is a valid texture. */
                return NULL;
@@ -1174,7 +1174,7 @@ bool OSLRenderServices::get_texture_info(OSL::ShaderGlobals *sg, ustring filenam
                                          TypeDesc datatype, void *data)
 {
        OSL::TextureSystem *ts = osl_ts;
-       if (filename.length() && filename[0] == '@') {
+       if(filename.length() && filename[0] == '@') {
                /* Special builtin textures. */
                return false;
        }
index e834d75c51356c27cb3e59e6d9a5e873f8950629..3cf33f4d4312a1fb5336c376f3793c2e6ce42d53 100644 (file)
@@ -262,7 +262,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
                                                ? (MicrofacetExtra*)closure_alloc_extra(sd, sizeof(MicrofacetExtra))
                                                : NULL;
 
-                                       if (bsdf && extra) {
+                                       if(bsdf && extra) {
                                                bsdf->N = N;
                                                bsdf->ior = (2.0f / (1.0f - safe_sqrtf(0.08f * specular))) - 1.0f;
                                                bsdf->T = T;
@@ -314,7 +314,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
                                                                ? (MicrofacetExtra*)closure_alloc_extra(sd, sizeof(MicrofacetExtra))
                                                                : NULL;
 
-                                                       if (bsdf && extra) {
+                                                       if(bsdf && extra) {
                                                                bsdf->N = N;
                                                                bsdf->T = make_float3(0.0f, 0.0f, 0.0f);
                                                                bsdf->extra = extra;