diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2015-06-03 00:06:31 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2015-06-03 00:06:31 +0200 |
| commit | 5bc49de682eec79f3dc8096c6812bee70fe2d496 (patch) | |
| tree | fa9655c46dded940496719f4f547b36ab5eb6c89 /src/sqlite3_db.cc | |
| parent | fb659a41cfe5523c62fd6993acddab120ccb0758 (diff) | |
Make it simpler to use DB
Add DB::Transaction
Diffstat (limited to 'src/sqlite3_db.cc')
| -rw-r--r-- | src/sqlite3_db.cc | 8 |
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 |
