diff options
author | Francisco Jerez <currojerez@riseup.net> | 2013-09-11 20:07:53 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2013-10-01 17:30:51 -0700 |
commit | 43bf36b080192f7ad5727ed96e86f0a49390d9dc (patch) | |
tree | e0edb9f48c2c437f1343864c9349b25d4d4012d1 /src/mesa | |
parent | 0e72db9f9729b8fe62213452751fed1cd337a7bc (diff) | |
download | external_mesa3d-43bf36b080192f7ad5727ed96e86f0a49390d9dc.zip external_mesa3d-43bf36b080192f7ad5727ed96e86f0a49390d9dc.tar.gz external_mesa3d-43bf36b080192f7ad5727ed96e86f0a49390d9dc.tar.bz2 |
glsl: Initialize all member variables of _mesa_glsl_parse_state on construction.
The _mesa_glsl_parse_state 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.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa')
0 files changed, 0 insertions, 0 deletions