From 741413e3fbdec6db691407271cf0ff48334aa049 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 29 Apr 2012 11:50:52 +0200 Subject: Make transaction_impl sanity check optional, use assert --- odb/mysql/transaction.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/odb/mysql/transaction.cxx b/odb/mysql/transaction.cxx index 81635ca..15666fc 100644 --- a/odb/mysql/transaction.cxx +++ b/odb/mysql/transaction.cxx @@ -2,6 +2,8 @@ // copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file +#include + #include namespace odb @@ -18,7 +20,7 @@ namespace odb // no virtual functions. The former is checked in the tests. // odb::transaction& b (odb::transaction::current ()); - dynamic_cast (b.implementation ()); + assert (dynamic_cast (&b.implementation ()) != 0); return reinterpret_cast (b); } } -- cgit v1.1