diff options
author | Francisco Jerez <currojerez@riseup.net> | 2013-09-20 16:27:42 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2013-10-01 17:30:51 -0700 |
commit | fde23b61a996b0f3348f20e7636253465822aca1 (patch) | |
tree | 70aab8618883e243d4ba8af7197958451846a9a5 /src/mesa/drivers/dri/i965/brw_cfg.h | |
parent | 58d772cb41b71dd3f5cf2bd4afb5781327ab4495 (diff) | |
download | external_mesa3d-fde23b61a996b0f3348f20e7636253465822aca1.zip external_mesa3d-fde23b61a996b0f3348f20e7636253465822aca1.tar.gz external_mesa3d-fde23b61a996b0f3348f20e7636253465822aca1.tar.bz2 |
i965: Initialize all member variables of bblock_t on construction.
The bblock_t object relies on the memory allocator zeroing out its
contents before it's initialized, which is quite an unusual practice
in the C++ world because it ties objects to some specific allocation
scheme, and gives unpredictable results when an object is created with
a different allocator -- Stack allocation, array allocation, or
aggregation inside a different object are some of the useful
possibilities that come to my mind. Initialize all fields from the
constructor and stop using the zeroing allocator.
v2: Use zero initialization for numeric types instead of default construction.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_cfg.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h index 27bc8b6..505a5cf 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.h +++ b/src/mesa/drivers/dri/i965/brw_cfg.h @@ -39,7 +39,7 @@ public: class bblock_t { public: - DECLARE_RZALLOC_CXX_OPERATORS(bblock_t) + DECLARE_RALLOC_CXX_OPERATORS(bblock_t) bblock_link *make_list(void *mem_ctx); |