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 | 78a16a0da40eab98665f383ba7fae84ff0caa3e6 (patch) | |
tree | a0ce1e8dcb160a02fbbb662c9964795c018cf4c8 | |
parent | a0b3e39f85a4d238b3c389b54bda4167bdaf3999 (diff) |
Make transaction_impl sanity check optional, use assert
-rw-r--r-- | odb/mssql/transaction.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/mssql/transaction.cxx b/odb/mssql/transaction.cxx index 6a90969..6783489 100644 --- a/odb/mssql/transaction.cxx +++ b/odb/mssql/transaction.cxx @@ -2,6 +2,8 @@ // copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC // license : ODB NCUEL; see accompanying LICENSE file +#include <cassert> + #include <odb/mssql/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); } } |