Use shared_ptrs for the connection

This commit is contained in:
Dr. Patrick Urbanke
2025-04-08 06:17:25 +02:00
parent 43ff5cee3f
commit 8a99272eca
2 changed files with 4 additions and 8 deletions

View File

@@ -103,7 +103,7 @@ typename Connection::ConnPtr Connection::make_conn(const std::string& _fname) {
throw std::runtime_error("Can't open database: " +
std::string(sqlite3_errmsg(conn)));
}
return ConnPtr(conn, &sqlite3_close);
return ConnPtr::make(std::shared_ptr<sqlite3>(conn, &sqlite3_close)).value();
}
std::string Connection::properties_to_sql(