From 48eb2eb3e40c43cc4a30faf4fc9848fbd5520d2f Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 23 Jul 2024 06:56:16 +0200 Subject: [PATCH] Remove debug code in SQLiteProcedures --- src/EnergyPlus/SQLiteProcedures.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index 56b7e53f825..5cd1aa4d2b1 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -2607,21 +2607,11 @@ SQLiteProcedures::SQLiteProcedures(std::shared_ptr const &errorStr fs::path const &errorFilePath) : m_writeOutputToSQLite(writeOutputToSQLite), m_errorStream(errorStream) { - constexpr bool debug = true; - sqlite3 *m_connection = nullptr; if (m_writeOutputToSQLite) { int rc = -1; bool ok = true; - if constexpr (debug) { - // std::cout << "errorStream=" << errorStream << ", dbName=" << dbName << std::endl; - // std::cout << "dbName.string()=" << dbName.string() << std::endl; - // std::cout << "dbName.generic_string()=" << dbName.generic_string() << std::endl; - std::wcout << "dbName.generic_wstring()=" << dbName.generic_wstring() << std::endl; - std::cout << "narrow(dbName.generic_wstring())=" << FileSystem::toGenericString(dbName) << std::endl; - } - std::string const dbName_utf8 = FileSystem::toGenericString(dbName); // Test if we can write to the sqlite error file @@ -2631,9 +2621,6 @@ SQLiteProcedures::SQLiteProcedures(std::shared_ptr const &errorStr } else { ok = false; } - if constexpr (debug) { - std::cout << "m_errorStream: " << std::boolalpha << ok << std::endl; - } // Test if we can create a new file named dbName if (ok && dbName != ":memory:") { @@ -2644,9 +2631,6 @@ SQLiteProcedures::SQLiteProcedures(std::shared_ptr const &errorStr ok = false; } } - if constexpr (debug) { - std::cout << "ofstream dbName: " << std::boolalpha << ok << std::endl; - } // Test if we can write to the database // If we can't then there are probably locks on the database @@ -2656,14 +2640,8 @@ SQLiteProcedures::SQLiteProcedures(std::shared_ptr const &errorStr if (rc) { *m_errorStream << "SQLite3 message, can't get exclusive lock to open database: " << sqlite3_errmsg(m_connection) << std::endl; ok = false; - if constexpr (debug) { - std::cout << "sqlite3_open_v2: " << std::boolalpha << ok << ' ' << sqlite3_errmsg(m_connection) << std::endl; - } } } - if constexpr (debug) { - std::cout << "sqlite3_open_v2: " << std::boolalpha << ok << std::endl; - } if (ok) { char *zErrMsg = nullptr;