summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-10-05 09:02:54 +0200
committerIago Toral Quiroga <[email protected]>2015-10-05 13:50:15 +0200
commit73e0dfbaca2fd334fd3505412bf0d38054affd25 (patch)
tree0d3a606e74f4b5d4267a8c8ef883a9196b5fd672 /src/mesa/main/enable.c
parenta90feb581a1c0e63bf13aace5d11b6532e881313 (diff)
i965: Make vec4_visitor's destructor virtual
We need a virtual destructor when at least one of the class' methods is virtual. Failure to do so might lead to undefined behavior when destructing derived classes. Fixes the following warning: brw_vec4_gs_visitor.cpp: In function 'const unsigned int* brw::brw_gs_emit(brw_context*, gl_shader_program*, brw_gs_compile*, void*, unsigned int*)': brw_vec4_gs_visitor.cpp:703:11: warning: deleting object of polymorphic class type 'brw::vec4_gs_visitor' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] delete gs; Curro: This shouldn't be causing any actual bugs at the moment because gen6_gs_visitor is the only subclass of vec4_visitor destroyed through a pointer of a base class (vec4_gs_visitor *) and its destructor is basically the same as its parent's. Anyway it seems sensible to change this so it doesn't bite us in the future. Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
0 files changed, 0 insertions, 0 deletions