remove unnecessary copying left over from debugging

This commit is contained in:
ouwou 2021-11-25 02:32:23 -05:00
parent fb3d69c5e7
commit 0da913cd4a

View File

@ -2159,8 +2159,7 @@ Store::Database::type_signal_close Store::Database::signal_close() {
Store::Statement::Statement(Database &db, const char *command) Store::Statement::Statement(Database &db, const char *command)
: m_db(&db) { : m_db(&db) {
if (m_db->SetError(sqlite3_prepare_v2(m_db->obj(), command, -1, &m_stmt, nullptr)) != SQLITE_OK) return; if (m_db->SetError(sqlite3_prepare_v2(m_db->obj(), command, -1, &m_stmt, nullptr)) != SQLITE_OK) return;
std::string tmp = command; m_db->signal_close().connect([this] {
m_db->signal_close().connect([tmp, this] {
sqlite3_finalize(m_stmt); sqlite3_finalize(m_stmt);
m_stmt = nullptr; m_stmt = nullptr;
}); });