Cycles: Code cleanup, spaces around keyword and brace
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 1 Jun 2015 13:11:57 +0000 (18:11 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 1 Jun 2015 14:49:52 +0000 (19:49 +0500)
intern/cycles/blender/blender_shader.cpp
intern/cycles/device/device.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/util/util_atomic.h

index d3b01fbf1d4ff21d3827e8d5df7ba770d3a97e95..2b0e8acae380bc9dd3ff37d5c15a5562e2b49c99 100644 (file)
@@ -897,7 +897,7 @@ static void add_nodes(Scene *scene,
                                output_map[b_output->ptr.data] = proxy->outputs[0];
                        }
                        
-                       if (b_group_ntree) {
+                       if(b_group_ntree) {
                                add_nodes(scene,
                                          b_engine,
                                          b_data,
index d69244a07bd0dfd1b06c3f3c37b98bf438a0acbe..0a4802c2c9018dbdbc3f9b0c36b30cb4669f3e0e 100644 (file)
@@ -94,7 +94,7 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int d
                }
 
                if(GLEW_VERSION_1_5) {
-                       if (!vertex_buffer)
+                       if(!vertex_buffer)
                                glGenBuffers(1, &vertex_buffer);
 
                        glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);
@@ -110,7 +110,7 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int d
                        vp = vbuffer;
                }
 
-               if (vp) {
+               if(vp) {
                        /* texture coordinate - vertex pair */
                        vp[0] = 0.0f;
                        vp[1] = 0.0f;
@@ -132,7 +132,7 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int d
                        vp[14] = dx;
                        vp[15] = (float)height + dy;
 
-                       if (vertex_buffer)
+                       if(vertex_buffer)
                                glUnmapBuffer(GL_ARRAY_BUFFER);
                }
 
index 8d690466c07f4c9a2279d1bd1f3e767ec26f8593..80a2dda22c444bd830ff49da12dd090d753913bb 100644 (file)
@@ -919,7 +919,7 @@ public:
                                draw_params.bind_display_space_shader_cb();
                        }
 
-                       if (!vertex_buffer)
+                       if(!vertex_buffer)
                                glGenBuffers(1, &vertex_buffer);
 
                        glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);
@@ -928,7 +928,7 @@ public:
 
                        vpointer = (float *)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY);
 
-                       if (vpointer) {
+                       if(vpointer) {
                                /* texture coordinate - vertex pair */
                                vpointer[0] = 0.0f;
                                vpointer[1] = 0.0f;
index 85a82d38275fc7b49f8dd978796a9f6128899bd0..1d1e296334804932ddb41c7133ef625e5cecd40a 100644 (file)
@@ -53,9 +53,9 @@ ccl_device_inline void atomic_add_float(volatile ccl_global float *source,
        do {
                prev_value.float_value = *source;
                new_value.float_value = prev_value.float_value + operand;
-       } while (atomic_cmpxchg((volatile ccl_global unsigned int *)source,
-                               prev_value.int_value,
-                               new_value.int_value) != prev_value.int_value);
+       } while(atomic_cmpxchg((volatile ccl_global unsigned int *)source,
+                              prev_value.int_value,
+                              new_value.int_value) != prev_value.int_value);
 }
 
 #endif  /* __KERNEL_OPENCL__ */