Skip to content

Commit 2b9d29a

Browse files
committed
Improve unused variable warning supperssion with multi-compiler friendly code.
[SVN r20466]
1 parent 95b95d0 commit 2b9d29a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/object/inheritance.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace boost {
3535
namespace
3636
{
3737
enum edge_cast_t { edge_cast = 8010 };
38+
template <class T> inline void unused_variable(const T&) { }
3839
}
3940

4041
// Install properties
@@ -215,7 +216,7 @@ namespace
215216

216217
vertex_t v = add_vertex(full_graph().topology());
217218
vertex_t v2 = add_vertex(up_graph().topology());
218-
(void)v2; // prevent unused var warning on non-debug compile
219+
unused_variable(v2);
219220
assert(v == v2);
220221
return type_index().insert(p, boost::make_tuple(type, v, dynamic_id_function(0)));
221222
}

0 commit comments

Comments
 (0)