diff --git a/calendar-daemon.cpp b/calendar-daemon.cpp index 8f874a3..ed89b38 100644 --- a/calendar-daemon.cpp +++ b/calendar-daemon.cpp @@ -26,7 +26,7 @@ sql::Database* init_database(std::string calendar) { return db::init(calendar + ".db"); } -void update_database(std::string directory, const sql::Database *db) { +void update_database(std::string directory, sql::Database *db) { std::vector objects = util::parse_cal_dir(directory); for(auto const& obj : objects) { if(obj->empty()) continue; @@ -34,7 +34,7 @@ void update_database(std::string directory, const sql::Database *db) { } } -void do_heartbeat(std::string directory, const sql::Database *db) { +void do_heartbeat(std::string directory, sql::Database *db) { util::notify("Updating files from " + directory, ""); update_database(directory, db); } diff --git a/db/create.h b/db/create.h index 6e901f9..e37d1bc 100644 --- a/db/create.h +++ b/db/create.h @@ -9,7 +9,6 @@ namespace db { sql::Database* db = new sql::Database(name, SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE); DEBUG << "SQLite database file '" << db->getFilename().c_str() << "' opened successfully\n"; - Schema* schema = new Schema(db); schema->run_migrations(); return db;