From 50127510e72732b069be040db2d2bbdad4d0be1c Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Mon, 23 Jun 2014 15:27:54 -0400 Subject: Remove confusing code block from SQLite3 database --- src/database-sqlite3.cpp | 80 +++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/src/database-sqlite3.cpp b/src/database-sqlite3.cpp index 268687c20..7f7850719 100644 --- a/src/database-sqlite3.cpp +++ b/src/database-sqlite3.cpp @@ -86,58 +86,54 @@ void Database_SQLite3::verifyDatabase() { if(m_database) return; - { - std::string dbp = m_savedir + DIR_DELIM + "map.sqlite"; - bool needs_create = false; - int d; + std::string dbp = m_savedir + DIR_DELIM "map.sqlite"; + bool needs_create = false; + int d; - /* - Open the database connection - */ + // Open the database connection - createDirs(m_savedir); // ? + createDirs(m_savedir); // ? - if(!fs::PathExists(dbp)) - needs_create = true; + if(!fs::PathExists(dbp)) + needs_create = true; - d = sqlite3_open_v2(dbp.c_str(), &m_database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); - if(d != SQLITE_OK) { - infostream<<"WARNING: SQLite3 database failed to open: "<