aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-18 14:11:32 -0700
committerKenneth Graunke <[email protected]>2013-09-21 09:17:21 -0700
commit4f1ebb8ddd0294698601a8c4fc38f1e39bfd51f6 (patch)
treede988eab944ebac1525f233ff33814d9f6e9fbda /src/mesa/program
parent81a3759bb51a1a12ba1c6c6ad586c5ff5f31c411 (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index cef32dc0712..c46a3d00541 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -149,17 +149,7 @@ dst_reg::dst_reg(src_reg reg)
class ir_to_mesa_instruction : public exec_node {
public:
- /* Callers of this ralloc-based new need not call delete. It's
- * easier to just ralloc_free 'ctx' (or any of its ancestors). */
- 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(ir_to_mesa_instruction)
enum prog_opcode op;
dst_reg dst;