From 4f1ebb8ddd0294698601a8c4fc38f1e39bfd51f6 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 18 Sep 2013 14:11:32 -0700 Subject: i965, mesa: Use the new DECLARE_R[Z]ALLOC_CXX_OPERATORS macros. These classes declared a placement new operator, but didn't declare a delete operator. Switching to the macro gives them a delete operator, which probably is a good idea anyway. This also eliminates a lot of boilerplate. v2: Properly use RZALLOC in Mesa IR/TGSI translators. Caught by Eric and Chad. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Chad Versace Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_cfg.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_cfg.h') diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h index 95a18e9..27bc8b6 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.h +++ b/src/mesa/drivers/dri/i965/brw_cfg.h @@ -39,15 +39,7 @@ public: class bblock_t { public: - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = rzalloc_size(ctx, size); - assert(node != NULL); - - return node; - } + DECLARE_RZALLOC_CXX_OPERATORS(bblock_t) bblock_link *make_list(void *mem_ctx); @@ -68,15 +60,7 @@ public: class cfg_t { public: - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = rzalloc_size(ctx, size); - assert(node != NULL); - - return node; - } + DECLARE_RZALLOC_CXX_OPERATORS(cfg_t) cfg_t(backend_visitor *v); cfg_t(void *mem_ctx, exec_list *instructions); -- cgit v1.1