Cycles: Cleanup, use explicit comparison with NULL
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 31 Aug 2018 10:28:12 +0000 (12:28 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 31 Aug 2018 10:28:12 +0000 (12:28 +0200)
intern/cycles/kernel/bvh/bvh_local.h
intern/cycles/kernel/bvh/qbvh_local.h

index 8def71bc890b7b011a535047ca2fb86951af52d8..2b02f4527bb7d01e944bd96c2224d457ad6d3cb6 100644 (file)
@@ -73,10 +73,9 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
        int object = OBJECT_NONE;
        float isect_t = ray->t;
 
-       if(local_isect) {
+       if(local_isect != NULL) {
                local_isect->num_hits = 0;
        }
-
        kernel_assert((local_isect == NULL) == (max_hits == 0));
 
        const int object_flag = kernel_tex_fetch(__object_flag, local_object);
index 0dc0575556c18a274fd81e6cf9584586201aa2a9..ee3827de3098fab978132e308b23218f19b5fd4a 100644 (file)
@@ -59,10 +59,9 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
        int object = OBJECT_NONE;
        float isect_t = ray->t;
 
-       if(local_isect) {
+       if(local_isect != NULL) {
                local_isect->num_hits = 0;
        }
-
        kernel_assert((local_isect == NULL) == (max_hits == 0));
 
        const int object_flag = kernel_tex_fetch(__object_flag, local_object);