From fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Dec 2023 21:57:53 +0300 Subject: Switch to build2 --- common/readonly/driver.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'common/readonly/driver.cxx') diff --git a/common/readonly/driver.cxx b/common/readonly/driver.cxx index 3358799..b207627 100644 --- a/common/readonly/driver.cxx +++ b/common/readonly/driver.cxx @@ -6,19 +6,21 @@ // member test. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include // DATABASE_* -#include +#include // DATABASE_* +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; using namespace odb::core; @@ -27,7 +29,7 @@ main (int argc, char* argv[]) { try { - auto_ptr db (create_database (argc, argv)); + unique_ptr db (create_database (argc, argv)); // Simple. // @@ -63,7 +65,7 @@ main (int argc, char* argv[]) // { pointer p (1, new pointer (2)); - auto_ptr p1 (new pointer (3)); + unique_ptr p1 (new pointer (3)); { transaction t (db->begin ()); @@ -86,7 +88,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr p (db->load (1)); + unique_ptr p (db->load (1)); t.commit (); assert (p->ro->id == 2 && p->co->id == 2 && p->rw->id == 3); @@ -204,7 +206,7 @@ main (int argc, char* argv[]) // Readonly object. // { -#ifndef DATABASE_COMMON +#ifndef MULTI_DATABASE typedef odb::object_traits_impl so_traits; typedef odb::object_traits_impl ro_traits; typedef odb::object_traits_impl rw_traits; @@ -305,8 +307,8 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr p1 (db->load (o1.id)); - auto_ptr p2 (db->load (o2.id)); + unique_ptr p1 (db->load (o1.id)); + unique_ptr p2 (db->load (o2.id)); t.commit (); assert (p1->num == o1.num); -- cgit v1.1