Skip to content

Commit ba65f70

Browse files
committed
Cycles: Cleanup: Don't use return on function returning void
1 parent 38eb91c commit ba65f70

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

intern/cycles/kernel/bvh/bvh.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -212,20 +212,21 @@ ccl_device_intersect void scene_intersect_local(KernelGlobals *kg,
212212
{
213213
#ifdef __OBJECT_MOTION__
214214
if(kernel_data.bvh.have_motion) {
215-
return bvh_intersect_local_motion(kg,
216-
&ray,
217-
local_isect,
218-
local_object,
219-
lcg_state,
220-
max_hits);
215+
bvh_intersect_local_motion(kg,
216+
&ray,
217+
local_isect,
218+
local_object,
219+
lcg_state,
220+
max_hits);
221+
return;
221222
}
222223
#endif /* __OBJECT_MOTION__ */
223-
return bvh_intersect_local(kg,
224-
&ray,
225-
local_isect,
226-
local_object,
227-
lcg_state,
228-
max_hits);
224+
bvh_intersect_local(kg,
225+
&ray,
226+
local_isect,
227+
local_object,
228+
lcg_state,
229+
max_hits);
229230
}
230231
#endif
231232

intern/cycles/kernel/bvh/bvh_local.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -246,20 +246,22 @@ ccl_device_inline void BVH_FUNCTION_NAME(KernelGlobals *kg,
246246
switch(kernel_data.bvh.bvh_layout) {
247247
#ifdef __QBVH__
248248
case BVH_LAYOUT_BVH4:
249-
return BVH_FUNCTION_FULL_NAME(QBVH)(kg,
250-
ray,
251-
local_isect,
252-
local_object,
253-
lcg_state,
254-
max_hits);
249+
BVH_FUNCTION_FULL_NAME(QBVH)(kg,
250+
ray,
251+
local_isect,
252+
local_object,
253+
lcg_state,
254+
max_hits);
255+
break;
255256
#endif
256257
case BVH_LAYOUT_BVH2:
257-
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
258-
ray,
259-
local_isect,
260-
local_object,
261-
lcg_state,
262-
max_hits);
258+
BVH_FUNCTION_FULL_NAME(BVH)(kg,
259+
ray,
260+
local_isect,
261+
local_object,
262+
lcg_state,
263+
max_hits);
264+
break;
263265
}
264266
kernel_assert(!"Should not happen");
265267
}

0 commit comments

Comments
 (0)