From 5bc49de682eec79f3dc8096c6812bee70fe2d496 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 3 Jun 2015 00:06:31 +0200 Subject: Make it simpler to use DB Add DB::Transaction --- src/sqlite3_db.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sqlite3_db.cc') diff --git a/src/sqlite3_db.cc b/src/sqlite3_db.cc index 3415d15..d1f0e1b 100644 --- a/src/sqlite3_db.cc +++ b/src/sqlite3_db.cc @@ -712,10 +712,10 @@ public: } // namespace // static -DB* SQLite3::open(const std::string& path) { - std::unique_ptr db(new DBImpl()); - db->open(path); - return db.release(); +std::unique_ptr SQLite3::open(const std::string& path) { + std::unique_ptr db(new DBImpl()); + static_cast(db.get())->open(path); + return db; } } // namespace stuff -- cgit v1.2.3-70-g09d2