From e51f51d55dac64512fe5d54895eee37e99ff9a48 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 31 Aug 2018 12:28:12 +0200 Subject: [PATCH] Cycles: Cleanup, use explicit comparison with NULL --- intern/cycles/kernel/bvh/bvh_local.h | 3 +-- intern/cycles/kernel/bvh/qbvh_local.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/intern/cycles/kernel/bvh/bvh_local.h b/intern/cycles/kernel/bvh/bvh_local.h index 8def71bc890..2b02f4527bb 100644 --- a/intern/cycles/kernel/bvh/bvh_local.h +++ b/intern/cycles/kernel/bvh/bvh_local.h @@ -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); diff --git a/intern/cycles/kernel/bvh/qbvh_local.h b/intern/cycles/kernel/bvh/qbvh_local.h index 0dc0575556c..ee3827de309 100644 --- a/intern/cycles/kernel/bvh/qbvh_local.h +++ b/intern/cycles/kernel/bvh/qbvh_local.h @@ -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);