Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-19 09:01:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-19 09:28:17 +0300
commit14b2a35c8bfd6d77f6357f929ddd82845436725f (patch)
tree54746d6a3cf0da24b95d2a9761e6222656eb5249 /intern/cycles/device
parent17a2820da8ad8ea23d336129f32e060e5746b047 (diff)
Cleanup: use parenthesis for if statements in macros
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/opencl/device_opencl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/device/opencl/device_opencl.h b/intern/cycles/device/opencl/device_opencl.h
index e0140996cf0..4fd3c27f17e 100644
--- a/intern/cycles/device/opencl/device_opencl.h
+++ b/intern/cycles/device/opencl/device_opencl.h
@@ -230,8 +230,9 @@ class OpenCLCache {
if (err != CL_SUCCESS) { \
string message = string_printf( \
"OpenCL error: %s in %s (%s:%d)", clewErrorString(err), #stmt, __FILE__, __LINE__); \
- if ((device)->error_message() == "") \
+ if ((device)->error_message() == "") { \
(device)->set_error(message); \
+ } \
fprintf(stderr, "%s\n", message.c_str()); \
} \
} \
@@ -244,8 +245,9 @@ class OpenCLCache {
if (err != CL_SUCCESS) { \
string message = string_printf( \
"OpenCL error: %s in %s (%s:%d)", clewErrorString(err), #stmt, __FILE__, __LINE__); \
- if (error_msg == "") \
+ if (error_msg == "") { \
error_msg = message; \
+ } \
fprintf(stderr, "%s\n", message.c_str()); \
} \
} \