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 | 95279da1a57faa4fc4e97bf7ab27dd53b8a7e4d5 (patch) | |
tree | e36c4f3010ffd9f90c4f5a6d3cb278185a1f541b | |
parent | 736b520b08c8d12e9536628317da17faa6081e84 (diff) |
Make transaction_impl sanity check optional, use assert
-rw-r--r-- | odb/sqlite/transaction.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/sqlite/transaction.cxx b/odb/sqlite/transaction.cxx index 2b874b8..7fd3f08 100644 --- a/odb/sqlite/transaction.cxx +++ b/odb/sqlite/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/sqlite/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); } } |