Fix: Warning in Cycles motion blur kernel features expression

This fixes the following warning with MSVC:
device_impl.cpp(287): warning C4805: '|=': unsafe mix of type 'bool' and type 'ccl::uint' in operation

The similar fix is applied to Metal code as well.

There is no short-circuiting boolean operator ||=, so expand the expression.

Pull Request: https://projects.blender.org/blender/blender/pulls/136561
This commit is contained in:
Sergey Sharybin
2025-03-26 17:20:33 +01:00
committed by Sergey Sharybin
parent 69270f612b
commit 42cbc52b07
2 changed files with 2 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ bool HIPRTDevice::load_kernels(const uint kernel_features)
* This is necessary since objects may be reported to have motion if the Vector pass is
* active, but may still need to be rendered without motion blur if that isn't active as well.
*/
use_motion_blur |= kernel_features & KERNEL_FEATURE_OBJECT_MOTION;
use_motion_blur = use_motion_blur || (kernel_features & KERNEL_FEATURE_OBJECT_MOTION);
/* get kernel */
const char *kernel_name = "kernel";