summaryrefslogtreecommitdiff
path: root/src/sqlite3_db.cc
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2015-06-03 00:06:31 +0200
committerJoel Klinghed <the_jk@yahoo.com>2015-06-03 00:06:31 +0200
commit5bc49de682eec79f3dc8096c6812bee70fe2d496 (patch)
treefa9655c46dded940496719f4f547b36ab5eb6c89 /src/sqlite3_db.cc
parentfb659a41cfe5523c62fd6993acddab120ccb0758 (diff)
Make it simpler to use DB
Add DB::Transaction
Diffstat (limited to 'src/sqlite3_db.cc')
-rw-r--r--src/sqlite3_db.cc8
1 files changed, 4 insertions, 4 deletions
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<DBImpl> db(new DBImpl());
- db->open(path);
- return db.release();
+std::unique_ptr<DB> SQLite3::open(const std::string& path) {
+ std::unique_ptr<DB> db(new DBImpl());
+ static_cast<DBImpl*>(db.get())->open(path);
+ return db;
}
} // namespace stuff