From 2b9d29a0fc7089def0956aaec1e4afee8632b2ce Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 24 Oct 2003 01:19:16 +0000 Subject: [PATCH] Improve unused variable warning supperssion with multi-compiler friendly code. [SVN r20466] --- src/object/inheritance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/object/inheritance.cpp b/src/object/inheritance.cpp index b7258f8e..659b98f9 100644 --- a/src/object/inheritance.cpp +++ b/src/object/inheritance.cpp @@ -35,6 +35,7 @@ namespace boost { namespace { enum edge_cast_t { edge_cast = 8010 }; + template inline void unused_variable(const T&) { } } // Install properties @@ -215,7 +216,7 @@ namespace vertex_t v = add_vertex(full_graph().topology()); vertex_t v2 = add_vertex(up_graph().topology()); - (void)v2; // prevent unused var warning on non-debug compile + unused_variable(v2); assert(v == v2); return type_index().insert(p, boost::make_tuple(type, v, dynamic_id_function(0))); }