diff --git a/src/airflow/contam/PrjAirflowElements.cpp b/src/airflow/contam/PrjAirflowElements.cpp index cb51e6c93dd..a0858b76beb 100644 --- a/src/airflow/contam/PrjAirflowElements.cpp +++ b/src/airflow/contam/PrjAirflowElements.cpp @@ -325,12 +325,12 @@ namespace contam { PlrLeak::PlrLeak(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double coef, double pres, double area1, double area2, double area3, int u_A1, int u_A2, int u_A3, int u_dP) : m_impl(std::shared_ptr( - new detail::PlrLeakImpl(nr, icon, name, desc, lam, turb, expt, coef, pres, area1, area2, area3, u_A1, u_A2, u_A3, u_dP))) {} + new detail::PlrLeakImpl(nr, icon, name, desc, lam, turb, expt, coef, pres, area1, area2, area3, u_A1, u_A2, u_A3, u_dP))) {} PlrLeak::PlrLeak(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string coef, std::string pres, std::string area1, std::string area2, std::string area3, int u_A1, int u_A2, int u_A3, int u_dP) : m_impl(std::shared_ptr( - new detail::PlrLeakImpl(nr, icon, name, desc, lam, turb, expt, coef, pres, area1, area2, area3, u_A1, u_A2, u_A3, u_dP))) {} + new detail::PlrLeakImpl(nr, icon, name, desc, lam, turb, expt, coef, pres, area1, area2, area3, u_A1, u_A2, u_A3, u_dP))) {} PlrLeak::PlrLeak(const PlrLeak& other) : m_impl(other.m_impl) {} @@ -990,12 +990,12 @@ namespace contam { PlrTest2::PlrTest2(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double dP1, double F1, double dP2, double F2, int u_P1, int u_F1, int u_P2, int u_F2) : m_impl(std::shared_ptr( - new detail::PlrTest2Impl(nr, icon, name, desc, lam, turb, expt, dP1, F1, dP2, F2, u_P1, u_F1, u_P2, u_F2))) {} + new detail::PlrTest2Impl(nr, icon, name, desc, lam, turb, expt, dP1, F1, dP2, F2, u_P1, u_F1, u_P2, u_F2))) {} PlrTest2::PlrTest2(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string dP1, std::string F1, std::string dP2, std::string F2, int u_P1, int u_F1, int u_P2, int u_F2) : m_impl(std::shared_ptr( - new detail::PlrTest2Impl(nr, icon, name, desc, lam, turb, expt, dP1, F1, dP2, F2, u_P1, u_F1, u_P2, u_F2))) {} + new detail::PlrTest2Impl(nr, icon, name, desc, lam, turb, expt, dP1, F1, dP2, F2, u_P1, u_F1, u_P2, u_F2))) {} PlrTest2::PlrTest2(const PlrTest2& other) : m_impl(other.m_impl) {} @@ -1498,12 +1498,12 @@ namespace contam { PlrShaft::PlrShaft(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double Ht, double area, double perim, double rough, int u_A, int u_D, int u_P, int u_R) : m_impl(std::shared_ptr( - new detail::PlrShaftImpl(nr, icon, name, desc, lam, turb, expt, Ht, area, perim, rough, u_A, u_D, u_P, u_R))) {} + new detail::PlrShaftImpl(nr, icon, name, desc, lam, turb, expt, Ht, area, perim, rough, u_A, u_D, u_P, u_R))) {} PlrShaft::PlrShaft(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string Ht, std::string area, std::string perim, std::string rough, int u_A, int u_D, int u_P, int u_R) : m_impl(std::shared_ptr( - new detail::PlrShaftImpl(nr, icon, name, desc, lam, turb, expt, Ht, area, perim, rough, u_A, u_D, u_P, u_R))) {} + new detail::PlrShaftImpl(nr, icon, name, desc, lam, turb, expt, Ht, area, perim, rough, u_A, u_D, u_P, u_R))) {} PlrShaft::PlrShaft(const PlrShaft& other) : m_impl(other.m_impl) {} @@ -2749,13 +2749,13 @@ namespace contam { AfeFan::AfeFan(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double rdens, double fdf, double sop, double off, std::vector fpc, double Sarea, int u_Sa, std::vector data) : m_impl(std::shared_ptr( - new detail::AfeFanImpl(nr, icon, name, desc, lam, turb, expt, rdens, fdf, sop, off, fpc, Sarea, u_Sa, data))) {} + new detail::AfeFanImpl(nr, icon, name, desc, lam, turb, expt, rdens, fdf, sop, off, fpc, Sarea, u_Sa, data))) {} AfeFan::AfeFan(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string rdens, std::string fdf, std::string sop, std::string off, std::vector fpc, std::string Sarea, int u_Sa, std::vector data) : m_impl(std::shared_ptr( - new detail::AfeFanImpl(nr, icon, name, desc, lam, turb, expt, rdens, fdf, sop, off, fpc, Sarea, u_Sa, data))) {} + new detail::AfeFanImpl(nr, icon, name, desc, lam, turb, expt, rdens, fdf, sop, off, fpc, Sarea, u_Sa, data))) {} AfeFan::AfeFan(const AfeFan& other) : m_impl(other.m_impl) {} diff --git a/src/airflow/contam/PrjObjects.cpp b/src/airflow/contam/PrjObjects.cpp index 37af572b6d4..c97bbd000fd 100644 --- a/src/airflow/contam/PrjObjects.cpp +++ b/src/airflow/contam/PrjObjects.cpp @@ -410,12 +410,12 @@ namespace contam { Species::Species(int nr, int sflag, int ntflag, std::string molwt, std::string mdiam, std::string edens, std::string decay, std::string Dm, std::string ccdef, std::string Cp, int ucc, int umd, int ued, int udm, int ucp, std::string name, std::string desc) : m_impl(std::shared_ptr( - new detail::SpeciesImpl(nr, sflag, ntflag, molwt, mdiam, edens, decay, Dm, ccdef, Cp, ucc, umd, ued, udm, ucp, name, desc))) {} + new detail::SpeciesImpl(nr, sflag, ntflag, molwt, mdiam, edens, decay, Dm, ccdef, Cp, ucc, umd, ued, udm, ucp, name, desc))) {} Species::Species(int nr, int sflag, int ntflag, double molwt, double mdiam, double edens, double decay, double Dm, double ccdef, double Cp, int ucc, int umd, int ued, int udm, int ucp, std::string name, std::string desc) : m_impl(std::shared_ptr( - new detail::SpeciesImpl(nr, sflag, ntflag, molwt, mdiam, edens, decay, Dm, ccdef, Cp, ucc, umd, ued, udm, ucp, name, desc))) {} + new detail::SpeciesImpl(nr, sflag, ntflag, molwt, mdiam, edens, decay, Dm, ccdef, Cp, ucc, umd, ued, udm, ucp, name, desc))) {} Species::Species(const Species& other) = default; diff --git a/src/airflow/contam/PrjSubobjects.cpp b/src/airflow/contam/PrjSubobjects.cpp index 59426bfe94b..8aa5d0d3d04 100644 --- a/src/airflow/contam/PrjSubobjects.cpp +++ b/src/airflow/contam/PrjSubobjects.cpp @@ -16,12 +16,14 @@ namespace contam { WeatherData::WeatherData(std::string Tambt, std::string barpres, std::string windspd, std::string winddir, std::string relhum, int daytyp, int uTa, int ubP, int uws, int uwd) : m_impl( - std::shared_ptr(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) {} + std::shared_ptr(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) { + } WeatherData::WeatherData(double Tambt, double barpres, double windspd, double winddir, double relhum, int daytyp, int uTa, int ubP, int uws, int uwd) : m_impl( - std::shared_ptr(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) {} + std::shared_ptr(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) { + } WeatherData::WeatherData(const WeatherData& other) = default; diff --git a/src/alfalfa/AlfalfaJSON.cpp b/src/alfalfa/AlfalfaJSON.cpp index 9fa41f5324e..a60b327a3e8 100644 --- a/src/alfalfa/AlfalfaJSON.cpp +++ b/src/alfalfa/AlfalfaJSON.cpp @@ -71,8 +71,7 @@ namespace alfalfa { } } } - LOG(Error, "Unable to write file to path '" << toString(m_JSONPath) << "', because parent directory " - << "could not be created."); + LOG(Error, "Unable to write file to path '" << toString(m_JSONPath) << "', because parent directory " << "could not be created."); return false; } diff --git a/src/energyplus/ForwardTranslator/ForwardTranslateThermalZone.cpp b/src/energyplus/ForwardTranslator/ForwardTranslateThermalZone.cpp index a41e7b5626d..219fb2ad995 100644 --- a/src/energyplus/ForwardTranslator/ForwardTranslateThermalZone.cpp +++ b/src/energyplus/ForwardTranslator/ForwardTranslateThermalZone.cpp @@ -1024,8 +1024,8 @@ namespace energyplus { zvRate += rate; zvRateForVolume += rateForVolume; } // if zoneEquipment.empty() - } // if dsoa - } // loop on spaces + } // if dsoa + } // loop on spaces if (!atLeastOneDSOAWasWritten && sizingZoneIdf) { // Controller:MechnicalVentilation: Design Specification Outdoor Air Object Name @@ -1111,7 +1111,7 @@ namespace energyplus { zoneVentilation.setDouble(ZoneVentilation_DesignFlowRateFields::AirChangesperHour, 3600.0 * zvRateForVolume / totVolume); } } // zone.equipment().emptpy() - } // End Sizing:Zone / ZV block + } // End Sizing:Zone / ZV block return idfObject; } diff --git a/src/energyplus/ReverseTranslator/ReverseTranslateAirLoopHVAC.cpp b/src/energyplus/ReverseTranslator/ReverseTranslateAirLoopHVAC.cpp index baa34c96751..8efde7f4455 100644 --- a/src/energyplus/ReverseTranslator/ReverseTranslateAirLoopHVAC.cpp +++ b/src/energyplus/ReverseTranslator/ReverseTranslateAirLoopHVAC.cpp @@ -151,8 +151,7 @@ namespace energyplus { } } } else { - LOG(Error, workspaceObject.briefDescription() << ": Missing supply branch list, " - << "Supply equipment will be incomplete"); + LOG(Error, workspaceObject.briefDescription() << ": Missing supply branch list, " << "Supply equipment will be incomplete"); } // March through the zone on the demand side and add branches for them. diff --git a/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemProgram.cpp b/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemProgram.cpp index 033e50ab21e..c65f5be1c24 100644 --- a/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemProgram.cpp +++ b/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemProgram.cpp @@ -120,7 +120,7 @@ namespace energyplus { } // end loop on all results in line emsProgram.addLine(newline); } // end if(line) - } // End loop on each line of the program + } // End loop on each line of the program return emsProgram; } diff --git a/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemSubroutine.cpp b/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemSubroutine.cpp index 47c37d53c38..49e1f84d017 100644 --- a/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemSubroutine.cpp +++ b/src/energyplus/ReverseTranslator/ReverseTranslateEnergyManagementSystemSubroutine.cpp @@ -117,7 +117,7 @@ namespace energyplus { } // end loop on all results in line emsProgram.addLine(newline); } // end if(line) - } // End loop on each line of the program + } // End loop on each line of the program return emsProgram; } diff --git a/src/energyplus/ReverseTranslator/ReverseTranslateOtherEquipment.cpp b/src/energyplus/ReverseTranslator/ReverseTranslateOtherEquipment.cpp index b9377b28212..4b8023a4bc5 100644 --- a/src/energyplus/ReverseTranslator/ReverseTranslateOtherEquipment.cpp +++ b/src/energyplus/ReverseTranslator/ReverseTranslateOtherEquipment.cpp @@ -34,8 +34,8 @@ namespace energyplus { return boost::none; } - LOG(Info, "OtherEquipment is an internal load separate from any other system, and not " - << "associated with an end use subcategory. Use with caution."); + LOG(Info, + "OtherEquipment is an internal load separate from any other system, and not " << "associated with an end use subcategory. Use with caution."); // create the definition openstudio::model::OtherEquipmentDefinition definition(m_model); diff --git a/src/energyplus/ReverseTranslator/ReverseTranslateZone.cpp b/src/energyplus/ReverseTranslator/ReverseTranslateZone.cpp index 8ef3a3bf303..ae6f8356113 100644 --- a/src/energyplus/ReverseTranslator/ReverseTranslateZone.cpp +++ b/src/energyplus/ReverseTranslator/ReverseTranslateZone.cpp @@ -230,9 +230,9 @@ namespace energyplus { break; } // End if zoneControlThermostatFound - } // End if ZoneorZoneListName exists on ZoneControl:Thermostat object - } // End Loop on each ZoneControlThermostats - } // End if _idfZoneName + } // End if ZoneorZoneListName exists on ZoneControl:Thermostat object + } // End Loop on each ZoneControlThermostats + } // End if _idfZoneName // Zone Equipment /* diff --git a/src/energyplus/Test/EnergyPlusFixture.cpp b/src/energyplus/Test/EnergyPlusFixture.cpp index 43310ad1d58..01802d95fbe 100644 --- a/src/energyplus/Test/EnergyPlusFixture.cpp +++ b/src/energyplus/Test/EnergyPlusFixture.cpp @@ -51,7 +51,7 @@ void EnergyPlusFixture::SetUpTestSuite() { } } } // for iterator over directory - } // foreach component + } // foreach component } void EnergyPlusFixture::TearDownTestSuite() { diff --git a/src/epjson/epJSONTranslator.cpp b/src/epjson/epJSONTranslator.cpp index ec7ee20341e..f7d0b55d9af 100644 --- a/src/epjson/epJSONTranslator.cpp +++ b/src/epjson/epJSONTranslator.cpp @@ -81,9 +81,7 @@ const std::string& toJSONFieldName(std::map& fieldName boost::replace_all(fieldName, "__", "_"); boost::replace_all(fieldName, ":", "_"); - const auto cache_value = [&](const auto& input, const auto& value) -> const auto& { - return fieldNames.emplace(input, value).first->second; - }; + const auto cache_value = [&](const auto& input, const auto& value) -> const auto& { return fieldNames.emplace(input, value).first->second; }; using namespace std::literals::string_view_literals; @@ -453,15 +451,14 @@ Json::Value toJSON(const openstudio::IdfFile& idf, const openstudio::path& schem const auto& [group_name, is_array_group] = openstudio::epJSON::getGroupName(group_names, field_names, schema, type_description, obj.iddObject().extensibleGroup()[0].name()); - auto& containing_json = [&json_object, &group_name = group_name, is_array_group = is_array_group ]() -> auto& { + auto& containing_json = [&json_object, &group_name = group_name, is_array_group = is_array_group]() -> auto& { if (is_array_group) { auto& array_obj = json_object[group_name]; return array_obj.append(Json::Value{Json::objectValue}); } else { return json_object; } - } - (); + }(); for (unsigned int idx = 0; idx < g.numFields(); ++idx) { const auto& iddField = obj.iddObject().extensibleGroup()[idx]; diff --git a/src/generateiddfactory/GenerateIddFactory.cpp b/src/generateiddfactory/GenerateIddFactory.cpp index 5166904396e..bcd793b19dc 100644 --- a/src/generateiddfactory/GenerateIddFactory.cpp +++ b/src/generateiddfactory/GenerateIddFactory.cpp @@ -375,8 +375,7 @@ void completeOutFiles(const IddFileFactoryDataVector& iddFiles, GenerateIddFacto if (x < nx) { std::cout << std::setw(25) << includedFileData.second[x] << " "; } else { - std::cout << std::setw(25) << " " - << " "; + std::cout << std::setw(25) << " " << " "; } if (y < ny) { std::cout << std::setw(25) << excludedObjects[y] << '\n'; @@ -384,7 +383,7 @@ void completeOutFiles(const IddFileFactoryDataVector& iddFiles, GenerateIddFacto std::cout << std::setw(25) << " " << '\n'; } } // for - } // if + } // if } // for @@ -769,8 +768,7 @@ IddFileFactoryData getFile(const std::string& fileName, const IddFileFactoryData // unsuccessful search, throw an informative message std::stringstream ss; - ss << "Unable to located included Idd file '" << fileName << "' in list of Idd files. " - << "The available files are named:" << '\n'; + ss << "Unable to located included Idd file '" << fileName << "' in list of Idd files. " << "The available files are named:" << '\n'; for (const IddFileFactoryData& idd : iddFiles) { ss << " " << idd.fileName() << '\n'; } diff --git a/src/generateiddfactory/IddFileFactoryData.cpp b/src/generateiddfactory/IddFileFactoryData.cpp index ce5a1745c7b..5c0332c2f29 100644 --- a/src/generateiddfactory/IddFileFactoryData.cpp +++ b/src/generateiddfactory/IddFileFactoryData.cpp @@ -55,8 +55,7 @@ IddFileFactoryData::IddFileFactoryData(const std::string& fileNameAndPathPair) { re = boost::regex("[a-zA-Z]\\w*"); ok = boost::regex_match(m_fileName, match, re); if (!ok) { - ss << "'" << m_fileName << "' is an invalid Idd file name. " - << "Please use Perl regex word characters, and start the name with a letter."; + ss << "'" << m_fileName << "' is an invalid Idd file name. " << "Please use Perl regex word characters, and start the name with a letter."; throw std::runtime_error(ss.str().c_str()); } diff --git a/src/gltf/GltfForwardTranslator.cpp b/src/gltf/GltfForwardTranslator.cpp index 9cd1089a4a7..40248bf9171 100644 --- a/src/gltf/GltfForwardTranslator.cpp +++ b/src/gltf/GltfForwardTranslator.cpp @@ -410,8 +410,7 @@ namespace gltf { // Exports a gltf against a Model // returns : exports a GLTF file against a Model bool GltfForwardTranslator::modelToGLTF(const model::Model& model, const path& outputPath) { - return modelToGLTF( - model, [](double percentage) {}, outputPath); + return modelToGLTF(model, [](double percentage) {}, outputPath); } bool GltfForwardTranslator::modelToGLTF(const model::Model& model, std::function updatePercentage, const path& outputPath) { diff --git a/src/install_utility/main.cpp b/src/install_utility/main.cpp index 8c8edd9b029..b5f10d58e61 100644 --- a/src/install_utility/main.cpp +++ b/src/install_utility/main.cpp @@ -78,14 +78,12 @@ int main(int argc, const char* argv[]) { openstudio::filesystem::path mongoPath = appDir.parent_path() / "pat\\mongo\\bin\\mongod.exe"; std::ostringstream oss; - oss << "netsh advfirewall firewall add rule name=\"Allow OpenStudio CLI\" dir=in program=" - << "\"" << cliPath.string() << "\" " + oss << "netsh advfirewall firewall add rule name=\"Allow OpenStudio CLI\" dir=in program=" << "\"" << cliPath.string() << "\" " << "action=allow"; std::system(oss.str().c_str()); std::ostringstream oss2; - oss2 << "netsh advfirewall firewall add rule name=\"Allow OpenStudio Mongo\" dir=in program=" - << "\"" << mongoPath.string() << "\" " + oss2 << "netsh advfirewall firewall add rule name=\"Allow OpenStudio Mongo\" dir=in program=" << "\"" << mongoPath.string() << "\" " << "action=allow"; std::system(oss2.str().c_str()); diff --git a/src/isomodel/ForwardTranslator.cpp b/src/isomodel/ForwardTranslator.cpp index a9056bad607..b6ff05a77e7 100644 --- a/src/isomodel/ForwardTranslator.cpp +++ b/src/isomodel/ForwardTranslator.cpp @@ -2268,4 +2268,4 @@ namespace isomodel { } // namespace isomodel // isomodel } // namespace openstudio - // openstudio +// openstudio diff --git a/src/isomodel/SimModel.cpp b/src/isomodel/SimModel.cpp index 43d29ad491b..d3c3767a884 100644 --- a/src/isomodel/SimModel.cpp +++ b/src/isomodel/SimModel.cpp @@ -50,8 +50,7 @@ namespace isomodel { #ifdef DEBUG_ISO_MODEL_SIMULATION std::stringstream ss; - ss << matName << "(" << mat.size1() << ", " << mat.size2() << "): " - << "\t"; + ss << matName << "(" << mat.size1() << ", " << mat.size2() << "): " << "\t"; for (unsigned int j = 0; j < mat.size2(); j++) { ss << "," << j; } diff --git a/src/measure/OSArgument.cpp b/src/measure/OSArgument.cpp index e9e71c4a609..260e26a672d 100644 --- a/src/measure/OSArgument.cpp +++ b/src/measure/OSArgument.cpp @@ -585,8 +585,8 @@ namespace measure { case OSArgumentType::String: case OSArgumentType::Choice: case OSArgumentType::Path: - LOG(Info, "OSDomainType " << domainType.valueName() << " does not make sense for " - << "arguments of type " << m_type.valueName() << ", such as " << name() << "."); + LOG(Info, "OSDomainType " << domainType.valueName() << " does not make sense for " << "arguments of type " << m_type.valueName() + << ", such as " << name() << "."); return false; default: break; diff --git a/src/measure/OSMeasureInfoGetter.cpp b/src/measure/OSMeasureInfoGetter.cpp index f68e740f32f..a8875042d32 100644 --- a/src/measure/OSMeasureInfoGetter.cpp +++ b/src/measure/OSMeasureInfoGetter.cpp @@ -306,7 +306,7 @@ namespace measure { return ss.str(); } - void MeasureInfoBinding::setMeasureInfo(OSMeasureInfo& info){}; + void MeasureInfoBinding::setMeasureInfo(OSMeasureInfo& info) {}; bool MeasureInfoBinding::renderFile(const std::string& readmeInPath) { return false; }; diff --git a/src/model/AirConditionerVariableRefrigerantFlow.cpp b/src/model/AirConditionerVariableRefrigerantFlow.cpp index 10160f2ceb4..cec8deeb6d9 100644 --- a/src/model/AirConditionerVariableRefrigerantFlow.cpp +++ b/src/model/AirConditionerVariableRefrigerantFlow.cpp @@ -1733,11 +1733,10 @@ namespace model { // If this doesn't agree with the current conditions, we warn... if ((openstudio::istringEqual("AirCooled", condenserType) || openstudio::istringEqual("EvaporativelyCooled", condenserType)) && (this->plantLoop())) { - LOG(Warn, "Setting the Condenser Type to '" << condenserType << "', you should disconnect from its PlantLoop. " - << "Occurred for " << briefDescription()); + LOG(Warn, "Setting the Condenser Type to '" << condenserType << "', you should disconnect from its PlantLoop. " << "Occurred for " + << briefDescription()); } else if (istringEqual("WaterCooled", condenserType) && !(this->plantLoop())) { - LOG(Warn, "Setting the Condenser Type to 'WaterCooled', you should connect it to a PlantLoop. " - << "Occurred for " << briefDescription()); + LOG(Warn, "Setting the Condenser Type to 'WaterCooled', you should connect it to a PlantLoop. " << "Occurred for " << briefDescription()); } // ... but we still do it... diff --git a/src/model/AirTerminalSingleDuctConstantVolumeReheat.cpp b/src/model/AirTerminalSingleDuctConstantVolumeReheat.cpp index 7a361717ed9..b2601ad362d 100644 --- a/src/model/AirTerminalSingleDuctConstantVolumeReheat.cpp +++ b/src/model/AirTerminalSingleDuctConstantVolumeReheat.cpp @@ -557,8 +557,8 @@ namespace model { bool test = setAvailabilitySchedule(availabilitySchedule); if (!test) { remove(); - LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " - << "availability schedule to " << availabilitySchedule.briefDescription() << "."); + LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " << "availability schedule to " + << availabilitySchedule.briefDescription() << "."); } this->autosizeMaximumAirFlowRate(); diff --git a/src/model/AirTerminalSingleDuctParallelPIUReheat.cpp b/src/model/AirTerminalSingleDuctParallelPIUReheat.cpp index cea6bb54593..70caf70e962 100644 --- a/src/model/AirTerminalSingleDuctParallelPIUReheat.cpp +++ b/src/model/AirTerminalSingleDuctParallelPIUReheat.cpp @@ -790,8 +790,8 @@ namespace model { bool test = setAvailabilitySchedule(schedule); if (!test) { remove(); - LOG_AND_THROW("Could not construct " << briefDescription() << ", because could not set its " - << "availability schedule to " << schedule.briefDescription() << "."); + LOG_AND_THROW("Could not construct " << briefDescription() << ", because could not set its " << "availability schedule to " + << schedule.briefDescription() << "."); } test = setFan(fan); diff --git a/src/model/AirTerminalSingleDuctVAVNoReheat.cpp b/src/model/AirTerminalSingleDuctVAVNoReheat.cpp index 14c5207cd6e..f918642706b 100644 --- a/src/model/AirTerminalSingleDuctVAVNoReheat.cpp +++ b/src/model/AirTerminalSingleDuctVAVNoReheat.cpp @@ -505,8 +505,8 @@ namespace model { bool test = setAvailabilitySchedule(schedule); if (!test) { remove(); - LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " - << "availability schedule to " << schedule.briefDescription() << "."); + LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " << "availability schedule to " + << schedule.briefDescription() << "."); } autosizeMaximumAirFlowRate(); diff --git a/src/model/AirTerminalSingleDuctVAVReheat.cpp b/src/model/AirTerminalSingleDuctVAVReheat.cpp index ae5632db373..c9ff38f484d 100644 --- a/src/model/AirTerminalSingleDuctVAVReheat.cpp +++ b/src/model/AirTerminalSingleDuctVAVReheat.cpp @@ -733,8 +733,8 @@ namespace model { bool test = setAvailabilitySchedule(availabilitySchedule); if (!test) { remove(); - LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " - << "availability schedule to " << availabilitySchedule.briefDescription() << "."); + LOG_AND_THROW("Unable to construct " << briefDescription() << ", because cannot set its " << "availability schedule to " + << availabilitySchedule.briefDescription() << "."); } setReheatCoil(coil); diff --git a/src/model/CoilWaterHeatingDesuperheater.cpp b/src/model/CoilWaterHeatingDesuperheater.cpp index 9beb1d4d014..ccc43b70ede 100644 --- a/src/model/CoilWaterHeatingDesuperheater.cpp +++ b/src/model/CoilWaterHeatingDesuperheater.cpp @@ -392,18 +392,16 @@ namespace model { || (heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_EvaporativeCooled) || (heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_WaterCooled)) { if (ratedHeatReclaimRecoveryEfficiency_.get() > 0.9) { - LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be" - << " <= 0.9 when Heating Source Object Type = " << heatingSourceIddObjectType.valueDescription() - << ". Resetting it to the default of 0.8."); + LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be" << " <= 0.9 when Heating Source Object Type = " + << heatingSourceIddObjectType.valueDescription() << ". Resetting it to the default of 0.8."); // setDouble to avoid a double check // setRatedHeatReclaimRecoveryEfficiency(0.8); setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, 0.8); } } else { if (ratedHeatReclaimRecoveryEfficiency_.get() > 0.3) { - LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be" - << " <= 0.3 when Heating Source Object Type = " << heatingSourceIddObjectType.valueDescription() - << ". Resetting it to the default of 0.25."); + LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be" << " <= 0.3 when Heating Source Object Type = " + << heatingSourceIddObjectType.valueDescription() << ". Resetting it to the default of 0.25."); // setRatedHeatReclaimRecoveryEfficiency(0.25); setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, 0.25); } diff --git a/src/model/Component.cpp b/src/model/Component.cpp index 62dc33da492..19262f1c1a1 100644 --- a/src/model/Component.cpp +++ b/src/model/Component.cpp @@ -43,8 +43,7 @@ namespace model { Workspace Component_Impl::cloneSubset(const std::vector& handles, bool keepHandles, StrictnessLevel level) const { if (!handles.empty()) { - LOG_AND_THROW("Components::cloneSubset is not supported. A workaround may be to clone() and " - << "then remove the unwanted objects."); + LOG_AND_THROW("Components::cloneSubset is not supported. A workaround may be to clone() and " << "then remove the unwanted objects."); } // create Model with same characteristics as this Component return Model_Impl::cloneSubset(handles, keepHandles, level); @@ -127,8 +126,7 @@ namespace model { Model_Impl::obsoleteComponentWatcher(watcher); LOG_AND_THROW("The ComponentData object or primaryComponentObject has been removed. " << "This Component is no longer valid. (The ComponentData object may have been removed " - << "because a relationship change called into question whether the Component was still " - << "valid.)"); + << "because a relationship change called into question whether the Component was still " << "valid.)"); } bool Component_Impl::save(const openstudio::path& p, bool overwrite) { @@ -166,8 +164,7 @@ namespace model { // All other objects are Component contents if (componentData.numComponentObjects() == 0) { - LOG_AND_THROW("Cannot construct Component from IdfFile because there are no objects listed " - << "in the contents."); + LOG_AND_THROW("Cannot construct Component from IdfFile because there are no objects listed " << "in the contents."); } int nNonTrivialObjects = numObjects() - getObjectsByType(IddObjectType::CommentOnly).size(); if (nNonTrivialObjects != static_cast(componentData.numComponentObjects()) + 1) { @@ -179,8 +176,7 @@ namespace model { try { ModelObjectVector componentContents = componentData.componentObjects(); } catch (...) { - LOG_AND_THROW("Cannot construct Component from IdfFile because at least one of the " - << "comprising objects cannot be located."); + LOG_AND_THROW("Cannot construct Component from IdfFile because at least one of the " << "comprising objects cannot be located."); } getImpl()->createComponentWatchers(); @@ -216,7 +212,7 @@ namespace model { Component::Component(const std::vector& contents) : Model(std::shared_ptr( - new detail::Component_Impl(*(contents[0].model().getImpl()), getHandles(contents)))) { + new detail::Component_Impl(*(contents[0].model().getImpl()), getHandles(contents)))) { // create Version object this->addVersionObject(); diff --git a/src/model/CurveFunctionalPressureDrop.cpp b/src/model/CurveFunctionalPressureDrop.cpp index 0e1949d3622..902de7bbbd4 100644 --- a/src/model/CurveFunctionalPressureDrop.cpp +++ b/src/model/CurveFunctionalPressureDrop.cpp @@ -56,14 +56,12 @@ namespace model { int CurveFunctionalPressureDrop_Impl::numVariables() const { LOG_AND_THROW("CurveFunctionalPressureDrop must be evaluated by EnergyPlus, in the context of " - << "plant pressure simulations. Therefore, numVariables and evaluate are not applicable " - << "for this curve type."); + << "plant pressure simulations. Therefore, numVariables and evaluate are not applicable " << "for this curve type."); } double CurveFunctionalPressureDrop_Impl::evaluate(const std::vector& /*independentVariables*/) const { LOG_AND_THROW("CurveFunctionalPressureDrop must be evaluated by EnergyPlus, in the context of " - << "plant pressure simulations. Therefore, numVariables and evaluate are not applicable " - << "for this curve type."); + << "plant pressure simulations. Therefore, numVariables and evaluate are not applicable " << "for this curve type."); } double CurveFunctionalPressureDrop_Impl::diameter() const { diff --git a/src/model/GasMixture.cpp b/src/model/GasMixture.cpp index ee2d92a4b3e..5ff5f6069eb 100644 --- a/src/model/GasMixture.cpp +++ b/src/model/GasMixture.cpp @@ -241,8 +241,8 @@ namespace model { bool GasMixture_Impl::setFractions(const std::vector& fractions) { if (fractions.size() != numGases()) { - LOG(Info, "Cannot set GasMixture " << briefDescription() << " fractions using vector " - << "of length " << fractions.size() << ", because the object currently lists " << numGases() << " gases."); + LOG(Info, "Cannot set GasMixture " << briefDescription() << " fractions using vector " << "of length " << fractions.size() + << ", because the object currently lists " << numGases() << " gases."); return false; } bool result = true; @@ -264,8 +264,7 @@ namespace model { } if ((i == n - 1) && (!openstudio::equal(fullSum, 1.0))) { LOG(Warn, "The sum of the fractions entered for GasMixture " << briefDescription() << " equal " << fullSum - << ", rather than 1.0, so the last entry will be adjusted " - << "accordingly."); + << ", rather than 1.0, so the last entry will be adjusted " << "accordingly."); value = 1.0 - minusOneSum; } result = setDouble(index, value); @@ -321,8 +320,8 @@ namespace model { result = OS_WindowMaterial_GasMixtureFields::Gas4Type; break; default: - LOG_AND_THROW("GasMixture only supports four gases, and is indexed starting with 0. Cannot " - << "return the gas type at index " << gasIndex << "."); + LOG_AND_THROW("GasMixture only supports four gases, and is indexed starting with 0. Cannot " << "return the gas type at index " << gasIndex + << "."); }; OS_ASSERT(result > 0); return result; @@ -344,8 +343,8 @@ namespace model { result = OS_WindowMaterial_GasMixtureFields::Gas4Fraction; break; default: - LOG_AND_THROW("GasMixture only supports four gases, and is indexed starting with 0. Cannot " - << "return the gas fraction at index " << gasIndex << "."); + LOG_AND_THROW("GasMixture only supports four gases, and is indexed starting with 0. Cannot " << "return the gas fraction at index " + << gasIndex << "."); }; OS_ASSERT(result > 0); return result; diff --git a/src/model/LayeredConstruction.cpp b/src/model/LayeredConstruction.cpp index 525330f2dc1..1a310f58443 100644 --- a/src/model/LayeredConstruction.cpp +++ b/src/model/LayeredConstruction.cpp @@ -831,8 +831,7 @@ RowName = '"; } // Rule 2 if (opaqueMaterials[i].optionalCast() && (i > 0)) { - LOG(Info, "Proposed OpaqueMaterials are invalid because RoofVegetation must be at layer 0, " - << "not layer " << i << "."); + LOG(Info, "Proposed OpaqueMaterials are invalid because RoofVegetation must be at layer 0, " << "not layer " << i << "."); return false; } } diff --git a/src/model/MasslessOpaqueMaterial.cpp b/src/model/MasslessOpaqueMaterial.cpp index 278843cef2a..49ce1ce2dc5 100644 --- a/src/model/MasslessOpaqueMaterial.cpp +++ b/src/model/MasslessOpaqueMaterial.cpp @@ -67,8 +67,7 @@ namespace model { } double MasslessOpaqueMaterial_Impl::thermalConductivity() const { - LOG_AND_THROW("Unable to convert thermal resistance to thermal conductivity for " - << "MasslessOpaqueMaterial " << briefDescription() << "."); + LOG_AND_THROW("Unable to convert thermal resistance to thermal conductivity for " << "MasslessOpaqueMaterial " << briefDescription() << "."); return 0.0; } @@ -77,8 +76,7 @@ namespace model { } double MasslessOpaqueMaterial_Impl::thermalResistivity() const { - LOG_AND_THROW("Unable to convert thermal resistance to thermal resistivity for " - << "MasslessOpaqueMaterial " << briefDescription() << "."); + LOG_AND_THROW("Unable to convert thermal resistance to thermal resistivity for " << "MasslessOpaqueMaterial " << briefDescription() << "."); return 0.0; } diff --git a/src/model/Model.cpp b/src/model/Model.cpp index a792e907030..73b8c11fb1f 100644 --- a/src/model/Model.cpp +++ b/src/model/Model.cpp @@ -2229,9 +2229,9 @@ namespace model { if (!openstudio::equal(inputResult, outputResult, tol)) { LOG_FREE(logLevel, "openstudio.model.Model", "The " << attributeName << " values determined for " << object.briefDescription() - << " using input and output data differ by a (relative) error " - << "greater than " << tol << ". The value calculated from input data was " << inputResult - << ", whereas the value calculated from output data was " << outputResult << "."); + << " using input and output data differ by a (relative) error " << "greater than " << tol + << ". The value calculated from input data was " << inputResult << ", whereas the value calculated from output data was " + << outputResult << "."); return false; } return true; diff --git a/src/model/PlantLoop.cpp b/src/model/PlantLoop.cpp index 6266b1ed9d3..3bba5c5e36a 100644 --- a/src/model/PlantLoop.cpp +++ b/src/model/PlantLoop.cpp @@ -191,8 +191,7 @@ namespace model { LOG(Debug, "i=" << i << ", nodeClone=" << nodeClones[i].name().get()); } } else { - LOG(Trace, "When cloning with (isSupplySide, isInlet) = (" << isSupplySide << ", " << isInlet << ")," - << "nodes.size()=" << nodes.size() + LOG(Trace, "When cloning with (isSupplySide, isInlet) = (" << isSupplySide << ", " << isInlet << ")," << "nodes.size()=" << nodes.size() << ", nodeClones.size()=" << nodeClones.size()); for (size_t i = 0; i < nodes.size(); ++i) { @@ -412,7 +411,7 @@ namespace model { } } } // End of loop on all branchComponents - } // End of loop splitterOutletModelObjects + } // End of loop splitterOutletModelObjects } // Add the new cloned nodes diff --git a/src/model/ScheduleRule.cpp b/src/model/ScheduleRule.cpp index 65a81d30b96..216978b667f 100644 --- a/src/model/ScheduleRule.cpp +++ b/src/model/ScheduleRule.cpp @@ -111,8 +111,7 @@ namespace model { ScheduleDay ScheduleRule_Impl::daySchedule() const { OptionalScheduleDay result = optionalDaySchedule(); if (!result) { - LOG_AND_THROW(briefDescription() << " has been corrupted. It no longer points to an " - << "OS:Schedule:Day object."); + LOG_AND_THROW(briefDescription() << " has been corrupted. It no longer points to an " << "OS:Schedule:Day object."); } return *result; } diff --git a/src/model/ScheduleRuleset.cpp b/src/model/ScheduleRuleset.cpp index f36dd7d0ed8..17eeb6fc591 100644 --- a/src/model/ScheduleRuleset.cpp +++ b/src/model/ScheduleRuleset.cpp @@ -251,8 +251,7 @@ namespace model { ScheduleDay ScheduleRuleset_Impl::defaultDaySchedule() const { OptionalScheduleDay result = optionalDefaultDaySchedule(); if (!result) { - LOG_AND_THROW(briefDescription() << " has been corrupted. It no longer points to a default " - << "OS:Schedule:Day object."); + LOG_AND_THROW(briefDescription() << " has been corrupted. It no longer points to a default " << "OS:Schedule:Day object."); } return *result; } diff --git a/src/model/Space.cpp b/src/model/Space.cpp index b63cdd745c1..fb0f4146b69 100644 --- a/src/model/Space.cpp +++ b/src/model/Space.cpp @@ -3055,9 +3055,8 @@ namespace model { // Enforce the same z std::vector reorderedFloorPrint; reorderedFloorPrint.reserve(floorPrint.size()); - std::transform(floorPrint.cbegin(), floorPrint.cend(), std::back_inserter(reorderedFloorPrint), [&z](const auto& pt) { - return Point3d{pt.x(), pt.y(), z}; - }); + std::transform(floorPrint.cbegin(), floorPrint.cend(), std::back_inserter(reorderedFloorPrint), + [&z](const auto& pt) { return Point3d{pt.x(), pt.y(), z}; }); boost::optional outwardNormal = getOutwardNormal(reorderedFloorPrint); if (!outwardNormal) { @@ -3107,9 +3106,8 @@ namespace model { // create the roofCeiling std::vector ceilingPoints; ceilingPoints.reserve(reorderedFloorPrint.size()); - std::transform(reorderedFloorPrint.crbegin(), reorderedFloorPrint.crend(), std::back_inserter(ceilingPoints), [zCeiling](const auto& pt) { - return Point3d{pt.x(), pt.y(), zCeiling}; - }); + std::transform(reorderedFloorPrint.crbegin(), reorderedFloorPrint.crend(), std::back_inserter(ceilingPoints), + [zCeiling](const auto& pt) { return Point3d{pt.x(), pt.y(), zCeiling}; }); Surface roofCeiling(ceilingPoints, model); if (!spaceName.empty()) { roofCeiling.setName(fmt::format("{} RoofCeiling", space.nameString())); diff --git a/src/model/SurfacePropertyGroundSurfaces.cpp b/src/model/SurfacePropertyGroundSurfaces.cpp index 21e3ae93138..fbb3fbb84fc 100644 --- a/src/model/SurfacePropertyGroundSurfaces.cpp +++ b/src/model/SurfacePropertyGroundSurfaces.cpp @@ -63,8 +63,7 @@ namespace model { } std::ostream& operator<<(std::ostream& out, const openstudio::model::GroundSurfaceGroup& groundSurfaceGroup) { - out << "(Surface = '" << groundSurfaceGroup.groundSurfaceName() << "', " - << "View Factor = " << groundSurfaceGroup.viewFactor() << ", "; + out << "(Surface = '" << groundSurfaceGroup.groundSurfaceName() << "', " << "View Factor = " << groundSurfaceGroup.viewFactor() << ", "; if (groundSurfaceGroup.temperatureSchedule()) { out << "Temperature Schedule = '" << groundSurfaceGroup.temperatureSchedule()->nameString() << "', "; } else { diff --git a/src/model/SurfacePropertySurroundingSurfaces.cpp b/src/model/SurfacePropertySurroundingSurfaces.cpp index 9ced140c0db..c5688d32e71 100644 --- a/src/model/SurfacePropertySurroundingSurfaces.cpp +++ b/src/model/SurfacePropertySurroundingSurfaces.cpp @@ -56,9 +56,8 @@ namespace model { } std::ostream& operator<<(std::ostream& out, const openstudio::model::SurroundingSurfaceGroup& surroundingSurfaceGroup) { - out << "(Surface = '" << surroundingSurfaceGroup.surroundingSurfaceName() << "', " - << "View Factor = " << surroundingSurfaceGroup.viewFactor() << ", " - << "Schedule = '" << surroundingSurfaceGroup.temperatureSchedule().nameString() << "')"; + out << "(Surface = '" << surroundingSurfaceGroup.surroundingSurfaceName() << "', " << "View Factor = " << surroundingSurfaceGroup.viewFactor() + << ", " << "Schedule = '" << surroundingSurfaceGroup.temperatureSchedule().nameString() << "')"; return out; } diff --git a/src/model/ThermochromicGlazing.cpp b/src/model/ThermochromicGlazing.cpp index 8fe21c78bf2..921bf6785f5 100644 --- a/src/model/ThermochromicGlazing.cpp +++ b/src/model/ThermochromicGlazing.cpp @@ -47,8 +47,7 @@ namespace model { } else { // keep running average if (!warned && !equal(glazingThickness, result)) { - LOG(Warn, "Thermochromic group '" << name().get() << "' contains glazings of different " - << "thicknesses."); + LOG(Warn, "Thermochromic group '" << name().get() << "' contains glazings of different " << "thicknesses."); warned = true; } result = (result * static_cast(n) + glazingThickness) / static_cast(n + 1); diff --git a/src/model/WeatherFile.cpp b/src/model/WeatherFile.cpp index 49517cd4d46..30eabd4b1b8 100644 --- a/src/model/WeatherFile.cpp +++ b/src/model/WeatherFile.cpp @@ -302,8 +302,8 @@ namespace model { openstudio::path workingPath(*currentPath); if (!currentPath->is_complete()) { newPath = openstudio::filesystem::system_complete(workingPath); - LOG(Debug, "Current path '" << toString(*currentPath) << "' not complete. " - << "After calling system_complete have '" << toString(newPath) << "'."); + LOG(Debug, "Current path '" << toString(*currentPath) << "' not complete. " << "After calling system_complete have '" << toString(newPath) + << "'."); } if (newPath.empty() || !openstudio::filesystem::exists(newPath)) { newPath = searchDirectory / *currentPath; diff --git a/src/model/ZonePropertyUserViewFactorsBySurfaceName.cpp b/src/model/ZonePropertyUserViewFactorsBySurfaceName.cpp index 095c0481b37..9ad2d4ff0ae 100644 --- a/src/model/ZonePropertyUserViewFactorsBySurfaceName.cpp +++ b/src/model/ZonePropertyUserViewFactorsBySurfaceName.cpp @@ -80,8 +80,8 @@ namespace model { } std::ostream& operator<<(std::ostream& out, const openstudio::model::ViewFactor& viewFactor) { - out << "(from " << viewFactor.fromSurface().iddObject().name() << "='" << viewFactor.fromSurface().nameString() << "', " - << "to " << viewFactor.toSurface().iddObject().name() << "='" << viewFactor.toSurface().nameString() << "', " + out << "(from " << viewFactor.fromSurface().iddObject().name() << "='" << viewFactor.fromSurface().nameString() << "', " << "to " + << viewFactor.toSurface().iddObject().name() << "='" << viewFactor.toSurface().nameString() << "', " << "view factor=" << viewFactor.viewFactor() << ")"; return out; } diff --git a/src/osversion/VersionTranslator.cpp b/src/osversion/VersionTranslator.cpp index 507dc9d1d86..534c778af0d 100644 --- a/src/osversion/VersionTranslator.cpp +++ b/src/osversion/VersionTranslator.cpp @@ -333,8 +333,7 @@ namespace osversion { OS_ASSERT(tempModel.strictnessLevel() == StrictnessLevel::Minimal); std::vector> issueInfo = fixInterobjectIssuesStage1(tempModel, m_originalVersion); if (!tempModel.isValid(StrictnessLevel::Draft)) { - LOG(Error, "Model with Version " << openStudioVersion() << " IDD is not valid to draft " - << "strictness level."); + LOG(Error, "Model with Version " << openStudioVersion() << " IDD is not valid to draft " << "strictness level."); LOG(Error, tempModel.validityReport(StrictnessLevel::Draft)); return boost::none; } @@ -383,8 +382,7 @@ namespace osversion { // bracket allowable versions LOG(Debug, "Starting translation from Version " << currentVersion.str() << "."); if (currentVersion < VersionString("0.7.0")) { - LOG(Error, "Version translation is not provided for OpenStudio models created prior to " - << "Version 0.7.0."); + LOG(Error, "Version translation is not provided for OpenStudio models created prior to " << "Version 0.7.0."); return; } if (currentVersion > VersionString(openStudioVersion())) { @@ -392,8 +390,8 @@ namespace osversion { // if currentVersion is just one ahead, may be a developer using the cloud. // let it pass as if currentVersion == openStudioVersion(), with a warning if (VersionString(openStudioVersion()).isNextVersion(currentVersion)) { - LOG(Warn, "Version extracted from file '" << currentVersion.str() << "' is one " - << "increment ahead of OpenStudio Version " << openStudioVersion() << ". " + LOG(Warn, "Version extracted from file '" << currentVersion.str() << "' is one " << "increment ahead of OpenStudio Version " + << openStudioVersion() << ". " << "Proceeding as if these versions are the same. Use with caution."); currentVersion = VersionString(openStudioVersion()); } else { @@ -622,8 +620,7 @@ namespace osversion { OS_ASSERT(ok); result = objCopy; } else { - LOG(Warn, "Tried to update the file path '" << original << "' to the new format, " - << "but was unsuccessful."); + LOG(Warn, "Tried to update the file path '" << original << "' to the new format, " << "but was unsuccessful."); } } } @@ -773,8 +770,8 @@ namespace osversion { match = candidates[0]; } if (match && match->name()) { - LOG(Warn, "Found match for object in OS:ComponentData contents list by type only, even " - << "though this type of object (" << typeStr << ") has a name field."); + LOG(Warn, "Found match for object in OS:ComponentData contents list by type only, even " << "though this type of object (" << typeStr + << ") has a name field."); } } @@ -788,8 +785,7 @@ namespace osversion { } else { LOG(Warn, "Unable to locate object in OS:ComponentData contents list called out " << "as object type '" << typeStr << "', and with name '" << nameStr - << "'. Skipping this object (that is, removing it from the Component " - << "definition)."); + << "'. Skipping this object (that is, removing it from the Component " << "definition)."); continue; } } @@ -1097,7 +1093,7 @@ namespace osversion { } } } // for keys - } // for users + } // for users m_refactored.emplace_back(originalSchedule, schedule.idfObject()); for (const auto& candidate : candidates) { model::ModelObjectVector wholeCandidate = getRecursiveChildren(candidate); diff --git a/src/radiance/ForwardTranslator.cpp b/src/radiance/ForwardTranslator.cpp index e9a0d3f1e9e..07925d52b82 100644 --- a/src/radiance/ForwardTranslator.cpp +++ b/src/radiance/ForwardTranslator.cpp @@ -315,16 +315,13 @@ namespace radiance { OFSTREAM vmxopt(vmxoptpath); if (vmxopt.is_open()) { outfiles.push_back(vmxoptpath); - vmxopt << "-ab " << (int)radianceParameters.ambientBouncesVMX() << " " - << "-ad " << (int)radianceParameters.ambientDivisionsVMX() << " " + vmxopt << "-ab " << (int)radianceParameters.ambientBouncesVMX() << " " << "-ad " << (int)radianceParameters.ambientDivisionsVMX() << " " << "-as " << (int)radianceParameters.ambientSupersamples() << " " // << "-c " << (int)radianceParameters.accumulatedRaysperRecord() << " " - << "-dj " << radianceParameters.directJitter() << " " - << "-dp " << radianceParameters.directPretest() << " " - << "-dt " << radianceParameters.directThreshold() << " " - << "-dc " << radianceParameters.directCertainty() << " " - << "-lw " << radianceParameters.limitWeightVMX() << " "; + << "-dj " << radianceParameters.directJitter() << " " << "-dp " << radianceParameters.directPretest() << " " << "-dt " + << radianceParameters.directThreshold() << " " << "-dc " << radianceParameters.directCertainty() << " " << "-lw " + << radianceParameters.limitWeightVMX() << " "; } else { LOG(Error, "Cannot open file '" << toString(vmxoptpath) << "' for writing"); @@ -336,16 +333,13 @@ namespace radiance { OFSTREAM dmxopt(dmxoptpath); if (dmxopt.is_open()) { outfiles.push_back(dmxoptpath); - dmxopt << "-ab " << (int)radianceParameters.ambientBouncesDMX() << " " - << "-ad " << (int)radianceParameters.ambientDivisionsDMX() << " " + dmxopt << "-ab " << (int)radianceParameters.ambientBouncesDMX() << " " << "-ad " << (int)radianceParameters.ambientDivisionsDMX() << " " << "-as " << (int)radianceParameters.ambientSupersamples() << " " // << "-c " << (int)radianceParameters.accumulatedRaysperRecord() << " " - << "-dj " << radianceParameters.directJitter() << " " - << "-dp " << radianceParameters.directPretest() << " " - << "-dt " << radianceParameters.directThreshold() << " " - << "-dc " << radianceParameters.directCertainty() << " " - << "-lw " << radianceParameters.limitWeightDMX() << " "; + << "-dj " << radianceParameters.directJitter() << " " << "-dp " << radianceParameters.directPretest() << " " << "-dt " + << radianceParameters.directThreshold() << " " << "-dc " << radianceParameters.directCertainty() << " " << "-lw " + << radianceParameters.limitWeightDMX() << " "; } else { LOG(Error, "Cannot open file '" << toString(dmxoptpath) << "' for writing"); diff --git a/src/scriptengine/ScriptEngine.hpp b/src/scriptengine/ScriptEngine.hpp index 766727ba703..cca628b50a9 100644 --- a/src/scriptengine/ScriptEngine.hpp +++ b/src/scriptengine/ScriptEngine.hpp @@ -67,9 +67,9 @@ class ScriptEngine // TODO: this is totally the wrong place to put it, but I'm trying to see if it works virtual void setupEmbeddedGems(const std::vector& includeDirs, const std::vector& gemPathDirs, const openstudio::path& gemHomeDir, const openstudio::path& bundleGemFilePath, - const openstudio::path& bundleGemDirPath, const std::string& bundleWithoutGroups){}; + const openstudio::path& bundleGemDirPath, const std::string& bundleWithoutGroups) {}; - virtual void setupPythonPath(const std::vector& includeDirs){}; + virtual void setupPythonPath(const std::vector& includeDirs) {}; virtual std::string inferMeasureClassName(const openstudio::path& measureScriptPath) = 0; diff --git a/src/sdd/Helpers.cpp b/src/sdd/Helpers.cpp index 5666069f408..64e938b0e6b 100644 --- a/src/sdd/Helpers.cpp +++ b/src/sdd/Helpers.cpp @@ -113,8 +113,8 @@ namespace sdd { pugi::xml_node result = element.root().first_child().child("Proj"); if (!result) { LOG_FREE(Error, "openstudio.sdd.Helpers", - "Couldn't find the 'Proj' element in the tree from the supplied element " - << "(name()='" << element.name() << "', text()='" << element.text().as_string() << "')."); + "Couldn't find the 'Proj' element in the tree from the supplied element " << "(name()='" << element.name() << "', text()='" + << element.text().as_string() << "')."); OS_ASSERT(false); } return result; diff --git a/src/sdd/MapHVAC.cpp b/src/sdd/MapHVAC.cpp index 97cb6470eb3..7653b60c178 100644 --- a/src/sdd/MapHVAC.cpp +++ b/src/sdd/MapHVAC.cpp @@ -1869,8 +1869,7 @@ namespace sdd { spm.setSetpointatOutdoorLowTemperature(rstSupHi.get()); } } else { - LOG(Warn, nameElement.text().as_string() << " requests OA reset control, but does not define setpoints." - << " Using OpenStudio defaults."); + LOG(Warn, nameElement.text().as_string() << " requests OA reset control, but does not define setpoints." << " Using OpenStudio defaults."); spm.setOutdoorLowTemperature(10.0); spm.setSetpointatOutdoorLowTemperature(22.0); @@ -5443,8 +5442,7 @@ namespace sdd { spm.setSetpointatOutdoorLowTemperature(rstSupHi.get()); } } else { - LOG(Warn, plantName << " requests OA reset control, but does not define setpoints." - << " Using OpenStudio defaults."); + LOG(Warn, plantName << " requests OA reset control, but does not define setpoints." << " Using OpenStudio defaults."); } } else if (istringEqual(tempCtrlElement.text().as_string(), "LoadReset")) { pugi::xml_node dsgnSupWtrTempElement = fluidSysElement.child("DsgnSupWtrTemp"); diff --git a/src/utilities/bcl/LocalBCL.cpp b/src/utilities/bcl/LocalBCL.cpp index 933b74bd367..9b45cef191e 100644 --- a/src/utilities/bcl/LocalBCL.cpp +++ b/src/utilities/bcl/LocalBCL.cpp @@ -1012,9 +1012,9 @@ bool LocalBCL::addComponent(BCLComponent& component) { { std::stringstream ss; - ss << "INSERT INTO Components (uid, version_id, name, description, date_added, date_modified) " - << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" << escape(component.name()) << "', '" - << escape(component.description()) << "', datetime('now','localtime'), datetime('now','localtime'));"; + ss << "INSERT INTO Components (uid, version_id, name, description, date_added, date_modified) " << "VALUES('" << escape(uid) << "', '" + << escape(versionId) << "', '" << escape(component.name()) << "', '" << escape(component.description()) + << "', datetime('now','localtime'), datetime('now','localtime'));"; statement = ss.str(); @@ -1039,9 +1039,8 @@ bool LocalBCL::addComponent(BCLComponent& component) { for (int i = 0; i < (int)component.files().size(); i++) { std::stringstream ss; - ss << "INSERT INTO Files (uid, version_id, filename, filetype) " - << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" << escape(component.files()[i]) << "', '" - << escape(component.filetypes()[i]) << "');"; + ss << "INSERT INTO Files (uid, version_id, filename, filetype) " << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" + << escape(component.files()[i]) << "', '" << escape(component.filetypes()[i]) << "');"; statement = ss.str(); @@ -1081,9 +1080,9 @@ bool LocalBCL::addComponent(BCLComponent& component) { } std::stringstream ss; - ss << "INSERT INTO Attributes (uid, version_id, name, value, units, type) " - << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" << escape(attribute.name()) << "', '" << escape(dataValue) << "', '" - << escape(attribute.units() ? attribute.units().get() : "") << "', '" << escape(dataType) << "');"; + ss << "INSERT INTO Attributes (uid, version_id, name, value, units, type) " << "VALUES('" << escape(uid) << "', '" << escape(versionId) + << "', '" << escape(attribute.name()) << "', '" << escape(dataValue) << "', '" << escape(attribute.units() ? attribute.units().get() : "") + << "', '" << escape(dataType) << "');"; statement = ss.str(); @@ -1201,10 +1200,9 @@ bool LocalBCL::addMeasure(BCLMeasure& measure) { { std::stringstream ss; - ss << "INSERT INTO Measures (uid, version_id, name, description, modeler_description, date_added, date_modified) " - << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" << escape(measure.name()) << "', '" << escape(measure.description()) - << "', '" << escape(measure.description()) << "'" - << ", datetime('now','localtime'), datetime('now','localtime'));"; + ss << "INSERT INTO Measures (uid, version_id, name, description, modeler_description, date_added, date_modified) " << "VALUES('" << escape(uid) + << "', '" << escape(versionId) << "', '" << escape(measure.name()) << "', '" << escape(measure.description()) << "', '" + << escape(measure.description()) << "'" << ", datetime('now','localtime'), datetime('now','localtime'));"; statement = ss.str(); @@ -1227,9 +1225,9 @@ bool LocalBCL::addMeasure(BCLMeasure& measure) { for (const BCLFileReference& file : measure.files()) { std::stringstream ss; - ss << "INSERT INTO Files (uid, version_id, filename, filetype, usage_type, checksum) " - << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" << escape(file.fileName()) << "', '" << escape(file.fileType()) << "', '" - << escape(file.usageType()) << "', '" << escape(file.checksum()) << "');"; + ss << "INSERT INTO Files (uid, version_id, filename, filetype, usage_type, checksum) " << "VALUES('" << escape(uid) << "', '" << escape(versionId) + << "', '" << escape(file.fileName()) << "', '" << escape(file.fileType()) << "', '" << escape(file.usageType()) << "', '" + << escape(file.checksum()) << "');"; statement = ss.str(); @@ -1268,9 +1266,9 @@ bool LocalBCL::addMeasure(BCLMeasure& measure) { } std::stringstream ss; - ss << "INSERT INTO Attributes (uid, version_id, name, value, units, type) " - << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" << escape(attribute.name()) << "', '" << escape(dataValue) << "', '" - << escape(attribute.units() ? attribute.units().get() : "") << "', '" << escape(dataType) << "');"; + ss << "INSERT INTO Attributes (uid, version_id, name, value, units, type) " << "VALUES('" << escape(uid) << "', '" << escape(versionId) << "', '" + << escape(attribute.name()) << "', '" << escape(dataValue) << "', '" << escape(attribute.units() ? attribute.units().get() : "") << "', '" + << escape(dataType) << "');"; statement = ss.str(); diff --git a/src/utilities/core/LogSink.cpp b/src/utilities/core/LogSink.cpp index 77dac3d60e6..e144045c796 100644 --- a/src/utilities/core/LogSink.cpp +++ b/src/utilities/core/LogSink.cpp @@ -54,8 +54,8 @@ namespace detail { Logger::instance().addTimeStampToLogger(); if (include_channel) { m_formatter = expr::stream << "[" << expr::format_date_time("TimeStamp", "%H:%M:%S.%f") << " " - << boost::phoenix::bind(&formatter_severity_upcase, expr::attr("Severity")) << "] " - << "[" << expr::attr("Channel") << "] " << expr::smessage; + << boost::phoenix::bind(&formatter_severity_upcase, expr::attr("Severity")) << "] " << "[" + << expr::attr("Channel") << "] " << expr::smessage; } else { m_formatter = expr::stream << "[" << expr::format_date_time("TimeStamp", "%H:%M:%S.%f") << " " << boost::phoenix::bind(&formatter_severity_upcase, expr::attr("Severity")) << "] " << expr::smessage; diff --git a/src/utilities/core/Path.cpp b/src/utilities/core/Path.cpp index 0e66a7ca26e..176b4c4f35d 100644 --- a/src/utilities/core/Path.cpp +++ b/src/utilities/core/Path.cpp @@ -70,8 +70,8 @@ path toPath(const std::string& s) { wstr.push_back(s[i] & 0xFF); } LOG_FREE(Debug, "Path", - "An error occurred trying to convert the input to a wide string." - << "\n Reason: " << e.what() << "\n Input =" << s << "\n Result=" << wstr); + "An error occurred trying to convert the input to a wide string." << "\n Reason: " << e.what() << "\n Input =" << s + << "\n Result=" << wstr); return path(wstr); } #endif diff --git a/src/utilities/data/Attribute.cpp b/src/utilities/data/Attribute.cpp index 53cc2922d3f..c88d12c1dcd 100644 --- a/src/utilities/data/Attribute.cpp +++ b/src/utilities/data/Attribute.cpp @@ -220,8 +220,8 @@ namespace detail { try { m_value = boost::lexical_cast(valueElement.text().as_string()); } catch (const boost::bad_lexical_cast&) { - LOG_AND_THROW("Please double check your XML, you have an Attribute with a ValueType of 'Double' " - << "but the Value isn't a double: [" << valueElement.text().as_string() << "]."); + LOG_AND_THROW("Please double check your XML, you have an Attribute with a ValueType of 'Double' " << "but the Value isn't a double: [" + << valueElement.text().as_string() << "]."); } } else if (m_valueType.value() == AttributeValueType::String) { // Note JM 2018-12-14: Carefull not to end up with const char, @@ -881,7 +881,7 @@ Attribute::Attribute(const openstudio::UUID& uuid, const openstudio::UUID& versi const boost::optional& displayName, const char* value, const boost::optional& units, const std::string& source) : m_impl( - std::shared_ptr(new detail::Attribute_Impl(uuid, versionUUID, name, displayName, std::string(value), units, source))) { + std::shared_ptr(new detail::Attribute_Impl(uuid, versionUUID, name, displayName, std::string(value), units, source))) { OS_ASSERT(m_impl); } diff --git a/src/utilities/data/TimeSeries.cpp b/src/utilities/data/TimeSeries.cpp index 48046bea8b8..cba0a138438 100644 --- a/src/utilities/data/TimeSeries.cpp +++ b/src/utilities/data/TimeSeries.cpp @@ -944,9 +944,7 @@ TimeSeries sum(const std::vector& timeSeriesVector) { result = result + ts; } if (result.values().empty()) { - LOG_FREE(Info, "zero.sum", - "Could not sum the timeSeriesVector. Either the first series is empty, or the " - << "units are incompatible."); + LOG_FREE(Info, "zero.sum", "Could not sum the timeSeriesVector. Either the first series is empty, or the " << "units are incompatible."); break; } first = false; diff --git a/src/utilities/filetypes/CSVFile.cpp b/src/utilities/filetypes/CSVFile.cpp index ecf3a722edc..916bdeb0f35 100644 --- a/src/utilities/filetypes/CSVFile.cpp +++ b/src/utilities/filetypes/CSVFile.cpp @@ -115,8 +115,7 @@ namespace detail { } } - LOG(Error, "Unable to write file to path '" << toString(*p) << "', because parent directory " - << "could not be created."); + LOG(Error, "Unable to write file to path '" << toString(*p) << "', because parent directory " << "could not be created."); return false; } diff --git a/src/utilities/filetypes/WorkflowJSON.cpp b/src/utilities/filetypes/WorkflowJSON.cpp index 4bbc8a60393..c01c66a8585 100644 --- a/src/utilities/filetypes/WorkflowJSON.cpp +++ b/src/utilities/filetypes/WorkflowJSON.cpp @@ -180,8 +180,7 @@ namespace detail { } } - LOG(Error, "Unable to write file to path '" << toString(*p) << "', because parent directory " - << "could not be created."); + LOG(Error, "Unable to write file to path '" << toString(*p) << "', because parent directory " << "could not be created."); return false; } diff --git a/src/utilities/geometry/Test/Polyhedron_GTest.cpp b/src/utilities/geometry/Test/Polyhedron_GTest.cpp index 601485006ab..45874696e87 100644 --- a/src/utilities/geometry/Test/Polyhedron_GTest.cpp +++ b/src/utilities/geometry/Test/Polyhedron_GTest.cpp @@ -133,15 +133,23 @@ TEST_F(GeometryFixture, Polyhedron_Box_With_Hole) { // This is a 10x10x1 box, with a 5x5x1 hole cut in the middle // We put extra vertices here to skew the calculate that Space::volume does - const Surface3d roof( - {{+10.0, +0.0, +1.0}, {+10.0, +10.0, +1.0}, {+0.0, +10.0, +1.0}, {+0.0, +0.0, +1.0}, - {+2.50, +2.5, +1.0}, {+2.50, +7.50, +1.0}, {+7.5, +7.50, +1.0}, {+7.5, +2.5, +1.0}, {+2.50, +2.5, +1.0}, {+0.0, +0.0, +1.0}}, "ROOF", 1); + const Surface3d roof({{+10.0, +0.0, +1.0}, + {+10.0, +10.0, +1.0}, + {+0.0, +10.0, +1.0}, + {+0.0, +0.0, +1.0}, + {+2.50, +2.5, +1.0}, + {+2.50, +7.50, +1.0}, + {+7.5, +7.50, +1.0}, + {+7.5, +2.5, +1.0}, + {+2.50, +2.5, +1.0}, + {+0.0, +0.0, +1.0}}, + "ROOF", 1); EXPECT_FALSE(roof.isConvex()); const Surface3d east1({{+10.0, +0.0, +1.0}, {+10.0, +0.0, +0.0}, {+10.0, +10.0, +0.0}, {+10.0, +10.0, +1.0}}, "EAST1", 2); EXPECT_TRUE(east1.isConvex()); - const Surface3d east2({{+7.50, +7.50, +1.0}, {+7.50, +7.50, +0.0}, {+7.50, +2.5, +0.0},{+7.50, +2.5, +1.0}}, "EAST2", 7); + const Surface3d east2({{+7.50, +7.50, +1.0}, {+7.50, +7.50, +0.0}, {+7.50, +2.5, +0.0}, {+7.50, +2.5, +1.0}}, "EAST2", 7); EXPECT_TRUE(east2.isConvex()); const Surface3d north1({{+10.0, +10.0, +1.0}, {+10.0, +10.0, +0.0}, {+0.0, +10.0, +0.0}, {+0.0, +10.0, +1.0}}, "NORTH1", 3); @@ -162,9 +170,17 @@ TEST_F(GeometryFixture, Polyhedron_Box_With_Hole) { const Surface3d south2({{+7.5, +2.5, +1.0}, {+7.5, +2.5, +0.0}, {+2.5, +2.5, +0.0}, {+2.5, +2.5, +1.0}}, "SOUTH2", 10); EXPECT_TRUE(south2.isConvex()); - const Surface3d floor( - {{+0.0, +10.0, +0.0}, {+10.0, +10.0, +0.0}, {+10.0, +0.0, +0.0}, {+0.0, +0.0, +0.0}, - {+2.50, +2.5, +0.0}, {+7.50, +2.50, +0.0}, {+7.50, +7.5, +0.0}, {+2.50, +7.50, +0.0}, {+2.50, +2.5, +0.0}, {+0.0, +0.0, +0.0}}, "FLOOR", 6); + const Surface3d floor({{+0.0, +10.0, +0.0}, + {+10.0, +10.0, +0.0}, + {+10.0, +0.0, +0.0}, + {+0.0, +0.0, +0.0}, + {+2.50, +2.5, +0.0}, + {+7.50, +2.50, +0.0}, + {+7.50, +7.5, +0.0}, + {+2.50, +7.50, +0.0}, + {+2.50, +2.5, +0.0}, + {+0.0, +0.0, +0.0}}, + "FLOOR", 6); EXPECT_FALSE(floor.isConvex()); const Polyhedron zonePoly({south1, north1, east1, west1, roof, floor, south2, north2, east2, west2}); diff --git a/src/utilities/idd/IddFile.cpp b/src/utilities/idd/IddFile.cpp index 1f81c9dcb10..5f96b88072d 100644 --- a/src/utilities/idd/IddFile.cpp +++ b/src/utilities/idd/IddFile.cpp @@ -101,8 +101,7 @@ namespace detail { if (objectType == IddObjectType::UserCustom) { LOG(Info, "Asked to return IddObject of type IddObjectType::UserCustom. Since " << "UserCustom object types are generally not unique, returning false rather than " - << "an IddObject. Please specify a different IddObjectType, or use " - << "getObject(const std::string&)."); + << "an IddObject. Please specify a different IddObjectType, or use " << "getObject(const std::string&)."); return result; } diff --git a/src/utilities/idd/IddFileAndFactoryWrapper.cpp b/src/utilities/idd/IddFileAndFactoryWrapper.cpp index 129d954cfc3..1d631624c52 100644 --- a/src/utilities/idd/IddFileAndFactoryWrapper.cpp +++ b/src/utilities/idd/IddFileAndFactoryWrapper.cpp @@ -152,8 +152,7 @@ boost::optional IddFileAndFactoryWrapper::getObject(IddObjectType obj if (objectType == IddObjectType::UserCustom) { LOG(Info, "Asked to return IddObject of type IddObjectType::UserCustom. Since " << "UserCustom object types are generally not unique, returning false rather than " - << "an IddObject. Please specify a different IddObjectType, or use " - << "getObject(const std::string&)."); + << "an IddObject. Please specify a different IddObjectType, or use " << "getObject(const std::string&)."); return result; } diff --git a/src/utilities/idd/Test/IddFile_GTest.cpp b/src/utilities/idd/Test/IddFile_GTest.cpp index 4127bfd0113..3b890c261b7 100644 --- a/src/utilities/idd/Test/IddFile_GTest.cpp +++ b/src/utilities/idd/Test/IddFile_GTest.cpp @@ -72,8 +72,7 @@ TEST_F(IddFixture, EpIddFile) { IddObjectType iddObjectType(iddObject.name()); loadedIddObjectTypes.insert(iddObjectType); } catch (...) { - LOG(Debug, "Unable to convert IddObject name '" << iddObject.name() << "' " - << "to IddObjectType."); + LOG(Debug, "Unable to convert IddObject name '" << iddObject.name() << "' " << "to IddObjectType."); } } else { loadedIddObjectTypes.insert(iddObject.type()); @@ -147,8 +146,7 @@ TEST_F(IddFixture, OSIddFile) { IddObjectType iddObjectType(iddObject.name()); loadedIddObjectTypes.insert(iddObjectType); } catch (...) { - LOG(Debug, "Unable to convert IddObject name '" << iddObject.name() << "' " - << "to IddObjectType."); + LOG(Debug, "Unable to convert IddObject name '" << iddObject.name() << "' " << "to IddObjectType."); } } else { loadedIddObjectTypes.insert(iddObject.type()); @@ -321,8 +319,8 @@ TEST_F(IddFixture, IddFile_EpMinFields) { } } if (setTo > 0) { - LOG(Debug, "IddObject " << object.name() << " has no min-fields property, but its last " - << "required field is " << fields[setTo].name() << "."); + LOG(Debug, + "IddObject " << object.name() << " has no min-fields property, but its last " << "required field is " << fields[setTo].name() << "."); } fields = object.extensibleGroup(); for (const IddField& field : fields) { diff --git a/src/utilities/idf/IdfFile.cpp b/src/utilities/idf/IdfFile.cpp index 19db65766a6..1f367218a2b 100644 --- a/src/utilities/idf/IdfFile.cpp +++ b/src/utilities/idf/IdfFile.cpp @@ -488,8 +488,7 @@ bool IdfFile::save(const openstudio::path& p, bool overwrite) { } } - LOG(Error, "Unable to write file to path '" << toString(wp) << "', because parent directory " - << "could not be created."); + LOG(Error, "Unable to write file to path '" << toString(wp) << "', because parent directory " << "could not be created."); return false; } @@ -692,8 +691,7 @@ void IdfFile::addVersionObject() { printWarn = false; } if (printWarn) { - LOG(Warn, "Unable to add Version Idf object, because could not identify a Version " - << "Idd object."); + LOG(Warn, "Unable to add Version Idf object, because could not identify a Version " << "Idd object."); } return; } diff --git a/src/utilities/idf/IdfObject.cpp b/src/utilities/idf/IdfObject.cpp index 4356d407245..de800fe37f4 100644 --- a/src/utilities/idf/IdfObject.cpp +++ b/src/utilities/idf/IdfObject.cpp @@ -1414,8 +1414,7 @@ namespace detail { if (candidate) { m_iddObject = *candidate; } else { - LOG(Warn, "IddObject type '" << objectType << "' not found in IddFactory. " - << "Reverting to default Catchall object."); + LOG(Warn, "IddObject type '" << objectType << "' not found in IddFactory. " << "Reverting to default Catchall object."); OS_ASSERT(m_iddObject.name() == "Catchall"); m_fields.push_back(objectType); objectType = "Catchall"; @@ -1527,10 +1526,8 @@ namespace detail { } } else { - LOG(Error, "IdfObject of type '" << m_iddObject.name() << "' " - << "cannot have field index of " << iddFieldIndex << ". " - << "Cutting off IdfObject field parsing here, with the following text " - << "remaining: " << '\n' + LOG(Error, "IdfObject of type '" << m_iddObject.name() << "' " << "cannot have field index of " << iddFieldIndex << ". " + << "Cutting off IdfObject field parsing here, with the following text " << "remaining: " << '\n' << fieldText << '\n' << std::string(start, stop)); return; @@ -1856,9 +1853,7 @@ namespace detail { } if (!units) { - LOG_AND_THROW("Unable to construct a unit for field " << index << " for IdfObject with " - << "Idd:\n" - << m_iddObject); + LOG_AND_THROW("Unable to construct a unit for field " << index << " for IdfObject with " << "Idd:\n" << m_iddObject); } OS_ASSERT(siUnit); diff --git a/src/utilities/idf/Workspace.cpp b/src/utilities/idf/Workspace.cpp index abff9bb4c49..36b1418ebc6 100644 --- a/src/utilities/idf/Workspace.cpp +++ b/src/utilities/idf/Workspace.cpp @@ -845,7 +845,7 @@ namespace detail { } } } // if (target does not have an equivalent) else - } // for each target of an object that has an equivalent + } // for each target of an object that has an equivalent ++equivIt; } // if (object does not have an equivalent) else ++i; @@ -1049,8 +1049,7 @@ namespace detail { working.order().setDirectOrder(HandleVector()); // maintain order in vector WorkspaceObjectVector wsObjects = working.addObjects(allObjects, false); if (wsObjects.size() != allObjects.size()) { - LOG(Error, "Unable to add objectsToAdd and objectsToInsert to their own Workspace as an " - << "intermediate step."); + LOG(Error, "Unable to add objectsToAdd and objectsToInsert to their own Workspace as an " << "intermediate step."); return result; } resolvePotentialNameConflicts(working, foundObjectIndices); @@ -1149,7 +1148,7 @@ namespace detail { } } } // if (target does not have an equivalent) else - } // for each target of an object that has an equivalent + } // for each target of an object that has an equivalent ++equivIt; } // if (object does not have an equivalent) else ++i; @@ -1205,8 +1204,7 @@ namespace detail { // make sure there is some overlap in references StringVector intersection = intersectReferenceLists(curRefs, newRefs); if (intersection.empty()) { - LOG(Info, "Unable to swap objects because the two objects' reference lists have an empty " - << "intersection. " << ss.str()); + LOG(Info, "Unable to swap objects because the two objects' reference lists have an empty " << "intersection. " << ss.str()); return false; } } @@ -1229,8 +1227,7 @@ namespace detail { if (potentialNameConflict(*newObjectName, newObjectInWS->iddObject())) { OptionalString ok = newObjectInWS->setName(nextName(newObjectInWS->iddObject().type(), false)); OS_ASSERT(ok); - LOG(Info, "Renaming " << newObject.briefDescription() << " during swap operation to " - << "avoid name conflict."); + LOG(Info, "Renaming " << newObject.briefDescription() << " during swap operation to " << "avoid name conflict."); } } } @@ -1244,8 +1241,7 @@ namespace detail { for (unsigned index : indices) { if (!source.canBeSource(index, newRefs)) { LOG(Info, "Unable to swap objects because one of the WorkspaceObject's sources, which is " - << "of type " << source.iddObject().name() << ", cannot point to the IdfObject from " - << "field " << index << ". " << ss.str()); + << "of type " << source.iddObject().name() << ", cannot point to the IdfObject from " << "field " << index << ". " << ss.str()); return false; } sources.push_back(HUPointer(source.handle(), index, 0)); @@ -1292,14 +1288,13 @@ namespace detail { if (!found) { LOG(Info, "Unable to swap objects because the IdfObject cannot be made to point to one of " << "the WorkspaceObject's targets, which is of type " << target.iddObject().name() << " and named '" << *targetName << "'. " - << ss.str() << " The IdfObject in question " - << "is:" << '\n' + << ss.str() << " The IdfObject in question " << "is:" << '\n' << newObject); return false; } } // if non-null target - } // for each currentObject.objectListFields() - } // if keepTargets + } // for each currentObject.objectListFields() + } // if keepTargets for (unsigned i : newObject.objectListFields()) { // if not spoken for ... @@ -1693,7 +1688,7 @@ namespace detail { } } } // for objectsRepeatedNames - } // StrictnessLevel ::Draft + } // StrictnessLevel ::Draft // StrictnessLevel::Final if (level > StrictnessLevel::Draft) { @@ -2431,8 +2426,7 @@ void Workspace::swap(Workspace& other) { auto& o2 = *(other.m_impl); if ((typeid(o1)) != typeid(o2)) { - LOG_AND_THROW("Workspaces can only be swapped if they are both of the same type " - << "(both Workspaces, both Models, or both Components)."); + LOG_AND_THROW("Workspaces can only be swapped if they are both of the same type " << "(both Workspaces, both Models, or both Components)."); } m_impl->swap(other); } diff --git a/src/utilities/idf/WorkspaceObject.cpp b/src/utilities/idf/WorkspaceObject.cpp index 1c004b76cb1..0a48905c02e 100644 --- a/src/utilities/idf/WorkspaceObject.cpp +++ b/src/utilities/idf/WorkspaceObject.cpp @@ -81,8 +81,7 @@ namespace detail { if (!workspace().isMember(targetHandle)) { if (!expectToLosePointers) { LOG(Trace, "Field " << index << " of '" << iddObject().name() << "' object points to an object with handle " << toString(targetHandle) - << ", but there is not object with that handle in the Workspace. Will try to " - << "interpret as a name."); + << ", but there is not object with that handle in the Workspace. Will try to " << "interpret as a name."); } targetHandle = Handle(); } @@ -1090,7 +1089,7 @@ namespace detail { result = fpIt->targetHandle; if (fpIt->targetHandle == targetHandle) { return result; - } // nothing to do + } // nothing to do nullifyPointer(index); // takes care of reverse pointer } } diff --git a/src/utilities/idf/WorkspaceObjectDiff.cpp b/src/utilities/idf/WorkspaceObjectDiff.cpp index 39635871716..364f73be08b 100644 --- a/src/utilities/idf/WorkspaceObjectDiff.cpp +++ b/src/utilities/idf/WorkspaceObjectDiff.cpp @@ -28,7 +28,7 @@ namespace detail { WorkspaceObjectDiff::WorkspaceObjectDiff(unsigned index, boost::optional oldValue, boost::optional newValue, boost::optional oldHandle, boost::optional newHandle) : IdfObjectDiff( - std::shared_ptr(new detail::WorkspaceObjectDiff_Impl(index, oldValue, newValue, oldHandle, newHandle))) { + std::shared_ptr(new detail::WorkspaceObjectDiff_Impl(index, oldValue, newValue, oldHandle, newHandle))) { OS_ASSERT(getImpl()); } diff --git a/src/utilities/sql/SqlFileTimeSeriesQuery.cpp b/src/utilities/sql/SqlFileTimeSeriesQuery.cpp index c1c9163a85a..38f03d972c9 100644 --- a/src/utilities/sql/SqlFileTimeSeriesQuery.cpp +++ b/src/utilities/sql/SqlFileTimeSeriesQuery.cpp @@ -46,8 +46,7 @@ KeyValueIdentifier::KeyValueIdentifier(const std::string& name) : m_names(1, nam KeyValueIdentifier::KeyValueIdentifier(const std::vector& names) : m_names(names) { if (m_names.empty()) { - LOG_AND_THROW("KeyValueIdentifier cannot be constructed from an empty string vector. " - << "Please use an OptionalKeyValueIdentifier instead."); + LOG_AND_THROW("KeyValueIdentifier cannot be constructed from an empty string vector. " << "Please use an OptionalKeyValueIdentifier instead."); } } diff --git a/src/utilities/sql/SqlFile_Impl.cpp b/src/utilities/sql/SqlFile_Impl.cpp index d32500e5dfa..8683c9c9eb0 100644 --- a/src/utilities/sql/SqlFile_Impl.cpp +++ b/src/utilities/sql/SqlFile_Impl.cpp @@ -597,11 +597,9 @@ namespace detail { + boost::lexical_cast(t_z) + ")"; std::stringstream mapInsert; - mapInsert << "insert into daylightmaps (MapNumber, MapName, Environment, Zone, ReferencePt1, ReferencePt2, Z) values (" << mapIndex << ", " - << "'" << t_name << "', " - << "'" << t_environmentName << "', " << *zoneIndex << ", " - << "'" << referencePt1 << "', " - << "'" << referencePt2 << "', " << t_z << ");"; + mapInsert << "insert into daylightmaps (MapNumber, MapName, Environment, Zone, ReferencePt1, ReferencePt2, Z) values (" << mapIndex << ", " << "'" + << t_name << "', " << "'" << t_environmentName << "', " << *zoneIndex << ", " << "'" << referencePt1 << "', " << "'" << referencePt2 + << "', " << t_z << ");"; execAndThrowOnError(mapInsert.str()); @@ -684,14 +682,9 @@ namespace detail { std::stringstream insertReportDataDictionary; insertReportDataDictionary << "insert into reportdatadictionary (ReportDataDictionaryIndex, IsMeter, Type, IndexGroup, TimestepType, KeyValue, " "Name, ReportingFrequency, ScheduleName, Units) values (" - << datadicindex << ", " - << "'0'," - << "'" << t_variableType << "', " - << "'" << t_indexGroup << "', " - << "'" << t_timestepType << "', " - << "'" << t_keyValue << "', " - << "'" << t_variableName << "', " - << "'" << t_reportingFrequency.valueName() << "', "; + << datadicindex << ", " << "'0'," << "'" << t_variableType << "', " << "'" << t_indexGroup << "', " << "'" + << t_timestepType << "', " << "'" << t_keyValue << "', " << "'" << t_variableName << "', " << "'" + << t_reportingFrequency.valueName() << "', "; if (t_scheduleName) { insertReportDataDictionary << "'" << *t_scheduleName << "', "; @@ -3251,9 +3244,7 @@ namespace detail { if (!ts) { if (istringEqual("Annual", reportingFrequency) || istringEqual("Environment", reportingFrequency)) { - LOG(Debug, "Trying query: " << queryEnvPeriod << ", " - << "Run Period" - << ", " << timeSeriesName << ", " << upperKeyValue); + LOG(Debug, "Trying query: " << queryEnvPeriod << ", " << "Run Period" << ", " << timeSeriesName << ", " << upperKeyValue); ts = timeSeries(queryEnvPeriod, "Run Period", timeSeriesName, keyValue); } } diff --git a/src/utilities/sql/Test/SqlFileFixture.cpp b/src/utilities/sql/Test/SqlFileFixture.cpp index 1dd767e9b02..fecd1d62301 100644 --- a/src/utilities/sql/Test/SqlFileFixture.cpp +++ b/src/utilities/sql/Test/SqlFileFixture.cpp @@ -46,8 +46,7 @@ ::testing::AssertionResult SqlFileFixture::IsWithinRelativeTolerance(double expe } else { // Google Test seems to be ingoring the fixed && precision iomanips return ::testing::AssertionFailure() << "Value isn't within the required tolerance of " << std::fixed << std::setprecision(2) << (tolerance * 100) - << "%. " - << "Expected Value = " << expectedValue << ", Sql Value = " << actualValue + << "%. " << "Expected Value = " << expectedValue << ", Sql Value = " << actualValue << ", Difference = " << (100 * percentageDifference) << "%."; } } diff --git a/src/utilities/units/OSQuantityVector.cpp b/src/utilities/units/OSQuantityVector.cpp index fb39713738b..d589ce5f32d 100644 --- a/src/utilities/units/OSQuantityVector.cpp +++ b/src/utilities/units/OSQuantityVector.cpp @@ -32,8 +32,7 @@ OSQuantityVector::OSQuantityVector(const std::vector& values) : m_unit const Scale& myScale = scale(); for (unsigned i = 0, n = size(); i < n; ++i) { if (!(values[i].units() == m_units)) { - LOG_AND_THROW("Quantity " << values[i] << " has units inconsistent with the first " - << "Quantity in vector values, " << values[0] << "."); + LOG_AND_THROW("Quantity " << values[i] << " has units inconsistent with the first " << "Quantity in vector values, " << values[0] << "."); } if (values[i].scale() != myScale) { Quantity working = values[i]; diff --git a/src/utilities/units/QuantityConverter.cpp b/src/utilities/units/QuantityConverter.cpp index ed5813121d4..b8da1b5a3f3 100644 --- a/src/utilities/units/QuantityConverter.cpp +++ b/src/utilities/units/QuantityConverter.cpp @@ -268,8 +268,7 @@ boost::optional QuantityConverterSingleton::m_convertToSI(const Quanti // apply conversion factor auto mapItr = m_toSImap.find(*it); if (mapItr == m_toSImap.end()) { - LOG(Error, "Cannot convert base unit '" << *it << "' to SI because it is not " - << "registered with the QuantityConverter."); + LOG(Error, "Cannot convert base unit '" << *it << "' to SI because it is not " << "registered with the QuantityConverter."); return boost::none; } baseUnitConversionFactor factor = mapItr->second; diff --git a/src/utilities/units/QuantityRegex.cpp b/src/utilities/units/QuantityRegex.cpp index 83afae77d1c..2fabde1eeed 100644 --- a/src/utilities/units/QuantityRegex.cpp +++ b/src/utilities/units/QuantityRegex.cpp @@ -204,18 +204,15 @@ const boost::regex& regexDirectScaledUnit() { std::stringstream tempComposer; // place atomicUnit*atomicUnit*... in tempComposer tempComposer << regexAtomicUnit().str() << "(?:\\*" << regexAtomicUnit().str() << ")*"; - regexComposer << "((?:" << tempComposer.str() << "|1)/)" - << " ?(10+)(?:(?: *|\\*)(" << tempComposer.str() << "))?"; + regexComposer << "((?:" << tempComposer.str() << "|1)/)" << " ?(10+)(?:(?: *|\\*)(" << tempComposer.str() << "))?"; static boost::regex rgx(regexComposer.str()); return rgx; } const boost::regex& regexEmbeddedDirectScaledUnit() { std::stringstream regexComposer; - regexComposer << "(?:(?:^| )(" << regexDirectScaledUnit().str() << ")(?:$| |\\.$|\\. |,|;)|" - << "\\((" << regexDirectScaledUnit().str() << ")\\)|" - << "\\{(" << regexDirectScaledUnit().str() << ")\\}|" - << "\\[(" << regexDirectScaledUnit().str() << ")\\])"; + regexComposer << "(?:(?:^| )(" << regexDirectScaledUnit().str() << ")(?:$| |\\.$|\\. |,|;)|" << "\\((" << regexDirectScaledUnit().str() << ")\\)|" + << "\\{(" << regexDirectScaledUnit().str() << ")\\}|" << "\\[(" << regexDirectScaledUnit().str() << ")\\])"; static boost::regex rgx(regexComposer.str()); return rgx; } @@ -254,10 +251,8 @@ const boost::regex& regexUnit() { const boost::regex& regexEmbeddedUnit() { std::stringstream regexComposer; - regexComposer << "(?:(?:^| )" << regexUnit().str() << "(?:$| |\\.$|\\. |,|;)|" - << "\\(" << regexUnit().str() << "\\)|" - << "\\{" << regexUnit().str() << "\\}|" - << "\\[" << regexUnit().str() << "\\])"; + regexComposer << "(?:(?:^| )" << regexUnit().str() << "(?:$| |\\.$|\\. |,|;)|" << "\\(" << regexUnit().str() << "\\)|" << "\\{" << regexUnit().str() + << "\\}|" << "\\[" << regexUnit().str() << "\\])"; static boost::regex rgx(regexComposer.str()); return rgx; } diff --git a/src/utilities/units/Unit.cpp b/src/utilities/units/Unit.cpp index e6c5178f144..316de04fcfb 100644 --- a/src/utilities/units/Unit.cpp +++ b/src/utilities/units/Unit.cpp @@ -25,9 +25,8 @@ namespace detail { Unit_Impl::Unit_Impl(int scaleExponent, const std::string& prettyString) : m_units(), m_scale(ScaleFactory::instance().createScale(scaleExponent)), m_prettyString(prettyString), m_system(UnitSystem::Mixed) { if (scale().value == 0.0) { - LOG_AND_THROW("Unit constructed with invalid scale exponent. " - << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " - << "to see what is available."); + LOG_AND_THROW("Unit constructed with invalid scale exponent. " << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " + << "to see what is available."); } } @@ -35,17 +34,15 @@ namespace detail { : m_units(), m_scale(ScaleFactory::instance().createScale(scaleAbbreviation)), m_prettyString(prettyString), m_system(UnitSystem::Mixed) { if (scale().value == 0.0) { LOG_AND_THROW("Unit constructed with invalid scaleAbbreviation. " - << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " - << "to see what is available."); + << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " << "to see what is available."); } } Unit_Impl::Unit_Impl(int scaleExponent, const std::string& prettyString, int numBaseUnits, UnitSystem system) : m_units(numBaseUnits), m_scale(ScaleFactory::instance().createScale(scaleExponent)), m_prettyString(prettyString), m_system(system) { if (scale().value == 0.0) { - LOG_AND_THROW("Unit constructed with invalid scale exponent. " - << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " - << "to see what is available."); + LOG_AND_THROW("Unit constructed with invalid scale exponent. " << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " + << "to see what is available."); } } @@ -53,8 +50,7 @@ namespace detail { : m_units(numBaseUnits), m_scale(ScaleFactory::instance().createScale(scaleAbbreviation)), m_prettyString(prettyString), m_system(system) { if (scale().value == 0.0) { LOG_AND_THROW("Unit constructed with invalid scaleAbbreviation. " - << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " - << "to see what is available."); + << "ScaleFactory::instance().registeredScales(), or << ScaleFactory::instance() " << "to see what is available."); } } @@ -258,7 +254,7 @@ namespace detail { result << "^" << -exp; } } // if - } // for + } // for if (parentheses) { result << ")"; @@ -375,7 +371,7 @@ namespace detail { setBaseUnitExponent(rUnitsIter->first, rUnitsIter->second); } } // if - } // for + } // for } ScaleOpReturnType resultScale = scale() * rUnit.scale(); diff --git a/src/utilities/xml/Test/XMLValidator_GTest.cpp b/src/utilities/xml/Test/XMLValidator_GTest.cpp index a8c3547f014..c38aa0e817f 100644 --- a/src/utilities/xml/Test/XMLValidator_GTest.cpp +++ b/src/utilities/xml/Test/XMLValidator_GTest.cpp @@ -221,7 +221,6 @@ INSTANTIATE_TEST_SUITE_P(XMLValidatorFixture, GbXMLValidatorParametrizedFixture, std::make_tuple("gbxml/Building_Central_Conceptual_Model.xml", 0, 3)), [](const testing::TestParamInfo& info) { auto filename = std::get<0>(info.param); - std::replace_if( - filename.begin(), filename.end(), [](char c) { return !std::isalnum(c); }, '_'); + std::replace_if(filename.begin(), filename.end(), [](char c) { return !std::isalnum(c); }, '_'); return filename; });