aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-29 11:50:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-29 11:50:52 +0200
commitac4b96030fc6d9f13d55766af54b644304e5fbe5 (patch)
tree6e4cdf9bad949047d8eea1682772b023bd51a039
parent01a78620adb935f421eb9bd3f36e2c07ebe61e22 (diff)
Make transaction_impl sanity check optional, use assert
-rw-r--r--odb/oracle/transaction.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/oracle/transaction.cxx b/odb/oracle/transaction.cxx
index f571a2b..36f34aa 100644
--- a/odb/oracle/transaction.cxx
+++ b/odb/oracle/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/oracle/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);
}
}