summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_cfg.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-09-18 14:11:32 -0700
committerKenneth Graunke <kenneth@whitecape.org>2013-09-21 09:17:21 -0700
commit4f1ebb8ddd0294698601a8c4fc38f1e39bfd51f6 (patch)
treede988eab944ebac1525f233ff33814d9f6e9fbda /src/mesa/drivers/dri/i965/brw_cfg.h
parent81a3759bb51a1a12ba1c6c6ad586c5ff5f31c411 (diff)
downloadexternal_mesa3d-4f1ebb8ddd0294698601a8c4fc38f1e39bfd51f6.zip
external_mesa3d-4f1ebb8ddd0294698601a8c4fc38f1e39bfd51f6.tar.gz
external_mesa3d-4f1ebb8ddd0294698601a8c4fc38f1e39bfd51f6.tar.bz2
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 <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_cfg.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.h20
1 files changed, 2 insertions, 18 deletions
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);