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
commitb6eb0dc0a1f35cd9f88c00b34de739cca5f68521 (patch)
tree73e72c9761fefe3a46e373132403ad739f38cc97
parent1bf2e2866c728d9c5468ad6a3d9c8b0ce49324ed (diff)
Make transaction_impl sanity check optional, use assert
-rw-r--r--odb/pgsql/transaction.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/pgsql/transaction.cxx b/odb/pgsql/transaction.cxx
index 0649344..b31e6a9 100644
--- a/odb/pgsql/transaction.cxx
+++ b/odb/pgsql/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/pgsql/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);
}
}