summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_symbol_table.h
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-09-30 00:12:40 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2014-10-02 00:59:35 -0400
commit3914dc579e816fbf7adef0038ab50f4660e78858 (patch)
tree9206be012172f7e4cae704b8ba6c68281944ae65 /src/glsl/glsl_symbol_table.h
parent4111b1d54b6c0ad0031506f81fb08d94b2db5a72 (diff)
downloadexternal_mesa3d-3914dc579e816fbf7adef0038ab50f4660e78858.zip
external_mesa3d-3914dc579e816fbf7adef0038ab50f4660e78858.tar.gz
external_mesa3d-3914dc579e816fbf7adef0038ab50f4660e78858.tar.bz2
glsl: make consistent use of DECLARE_RALLOC_CXX_OPERATORS
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/glsl_symbol_table.h')
-rw-r--r--src/glsl/glsl_symbol_table.h33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h
index 2528264..e32b88b 100644
--- a/src/glsl/glsl_symbol_table.h
+++ b/src/glsl/glsl_symbol_table.h
@@ -43,37 +43,8 @@ struct glsl_type;
* type safe and some symbol table invariants.
*/
struct glsl_symbol_table {
-private:
- static void
- _glsl_symbol_table_destructor (glsl_symbol_table *table)
- {
- table->~glsl_symbol_table();
- }
-
-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 *table;
-
- table = ralloc_size(ctx, size);
- assert(table != NULL);
-
- ralloc_set_destructor(table, (void (*)(void*)) _glsl_symbol_table_destructor);
-
- return table;
- }
-
- /* If the user *does* call delete, that's OK, we will just
- * ralloc_free in that case. Here, C++ will have already called the
- * destructor so tell ralloc not to do that again. */
- static void operator delete(void *table)
- {
- ralloc_set_destructor(table, NULL);
- ralloc_free(table);
- }
-
+ DECLARE_RALLOC_CXX_OPERATORS(glsl_symbol_table)
+
glsl_symbol_table();
~glsl_symbol_table();