From: ShadowNinja Date: Mon, 23 Jun 2014 19:27:54 +0000 (-0400) Subject: Remove confusing code block from SQLite3 database X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=50127510e72732b069be040db2d2bbdad4d0be1c;p=zefram%2Fminetest%2Fminetest_engine.git Remove confusing code block from SQLite3 database --- diff --git a/src/database-sqlite3.cpp b/src/database-sqlite3.cpp index 268687c2..7f785071 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: "<