[Bf-blender-cvs] [01363b5dc4f] cycles-x: Cycles X: Initialize all fields of buffer params
Sergey Sharybin
noreply at git.blender.org
Tue Jun 29 12:20:22 CEST 2021
Commit: 01363b5dc4f8c9ef84fbcfaa6d971b6622e1fc4c
Author: Sergey Sharybin
Date: Mon Jun 21 17:31:16 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB01363b5dc4f8c9ef84fbcfaa6d971b6622e1fc4c
Cycles X: Initialize all fields of buffer params
Allows to rely on default constructor and follow-up call of
modified() without accessing non-initialized fields.
===================================================================
M intern/cycles/render/buffers.h
===================================================================
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h
index 76ac3c393b6..93ea5393554 100644
--- a/intern/cycles/render/buffers.h
+++ b/intern/cycles/render/buffers.h
@@ -40,14 +40,14 @@ struct float4;
class BufferParams {
public:
/* width/height of the physical buffer */
- int width;
- int height;
+ int width = 0;
+ int height = 0;
/* offset into and width/height of the full buffer */
- int full_x;
- int full_y;
- int full_width;
- int full_height;
+ int full_x = 0;
+ int full_y = 0;
+ int full_width = 0;
+ int full_height = 0;
/* Runtime fields, only valid after `update_passes()` or `update_offset_stride()`. */
int offset = -1, stride = -1;
More information about the Bf-blender-cvs
mailing list