diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-04-29 11:50:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-04-29 11:50:52 +0200 |
commit | 741413e3fbdec6db691407271cf0ff48334aa049 (patch) | |
tree | c281f50499e3ddef946811f6e30bc4ec7f035aaa | |
parent | 2f2445901be048a520d07883ff70e021f158c6ff (diff) |
Make transaction_impl sanity check optional, use assert
-rw-r--r-- | odb/mysql/transaction.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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 <cassert> + #include <odb/mysql/transaction.hxx> 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<transaction_impl&> (b.implementation ()); + assert (dynamic_cast<transaction_impl*> (&b.implementation ()) != 0); return reinterpret_cast<transaction&> (b); } } |