@@ -104,8 +104,6 @@ bool ParseSQLiteInput(EnergyPlusData &state, bool &writeOutputToSQLite, bool &wr
104
104
return input;
105
105
};
106
106
107
- auto &sql_ort = state.dataOutRptTab ;
108
-
109
107
// There can only be 1 "Output:SQLite"
110
108
auto const instance = instances.value ().begin ();
111
109
auto const &fields = instance.value ();
@@ -123,6 +121,8 @@ bool ParseSQLiteInput(EnergyPlusData &state, bool &writeOutputToSQLite, bool &wr
123
121
}
124
122
{ // "unit_conversion_for_tabular_data"
125
123
std::string tabularDataUnitConversion = find_input (fields, " unit_conversion_for_tabular_data" );
124
+ auto const &sql_ort = state.dataOutRptTab ;
125
+
126
126
if (" UseOutputControlTableStyles" == tabularDataUnitConversion) {
127
127
// Jan 2021 Note: Since here we do not know weather sql_ort->unitsStyle has been processed or not,
128
128
// the value "NotFound" is used for the option "UseOutputControlTableStyles" at this point;
@@ -1577,7 +1577,6 @@ void SQLite::createSQLiteTimeIndexRecord(OutputProcessor::ReportFreq const repor
1577
1577
bool const warmupFlag)
1578
1578
{
1579
1579
if (m_writeOutputToSQLite) {
1580
- int intStartMinute = 0 ;
1581
1580
int intervalInMinutes = 60 ;
1582
1581
1583
1582
static std::vector<int > lastDayOfMonth = {31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 };
@@ -1595,7 +1594,7 @@ void SQLite::createSQLiteTimeIndexRecord(OutputProcessor::ReportFreq const repor
1595
1594
++m_sqlDBTimeIndex;
1596
1595
1597
1596
int intEndMinute = static_cast <int >(endMinute + 0.5 );
1598
- intStartMinute = static_cast <int >(startMinute + 0.5 );
1597
+ int intStartMinute = static_cast <int >(startMinute + 0.5 );
1599
1598
int t_hour = hour;
1600
1599
intervalInMinutes = intEndMinute - intStartMinute;
1601
1600
adjustReportingHourAndMinutes (t_hour, intEndMinute);
@@ -2611,7 +2610,7 @@ SQLiteProcedures::SQLiteProcedures(std::shared_ptr<std::ostream> const &errorStr
2611
2610
{
2612
2611
sqlite3 *m_connection = nullptr ;
2613
2612
if (m_writeOutputToSQLite) {
2614
- int rc = - 1 ;
2613
+ int rc;
2615
2614
bool ok = true ;
2616
2615
2617
2616
std::string const dbName_utf8 = FileSystem::toGenericString (dbName);
0 commit comments