Skip to content

Commit

Permalink
[chore] Commit clang-format autocorrects
Browse files Browse the repository at this point in the history
  • Loading branch information
github-lint-actions[bot] committed Dec 19, 2024
1 parent 75ced58 commit b3d2e94
Show file tree
Hide file tree
Showing 70 changed files with 217 additions and 291 deletions.
16 changes: 8 additions & 8 deletions src/airflow/contam/PrjAirflowElements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<detail::PlrLeakImpl>(
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<detail::PlrLeakImpl>(
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) {}

Expand Down Expand Up @@ -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<detail::PlrTest2Impl>(
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<detail::PlrTest2Impl>(
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) {}

Expand Down Expand Up @@ -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<detail::PlrShaftImpl>(
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<detail::PlrShaftImpl>(
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) {}

Expand Down Expand Up @@ -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<double> fpc, double Sarea, int u_Sa, std::vector<FanDataPoint> data)
: m_impl(std::shared_ptr<detail::AfeFanImpl>(
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<std::string> fpc, std::string Sarea, int u_Sa,
std::vector<FanDataPoint> data)
: m_impl(std::shared_ptr<detail::AfeFanImpl>(
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) {}

Expand Down
4 changes: 2 additions & 2 deletions src/airflow/contam/PrjObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<detail::SpeciesImpl>(
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<detail::SpeciesImpl>(
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;

Expand Down
6 changes: 4 additions & 2 deletions src/airflow/contam/PrjSubobjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<detail::WeatherDataImpl>(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) {}
std::shared_ptr<detail::WeatherDataImpl>(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<detail::WeatherDataImpl>(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) {}
std::shared_ptr<detail::WeatherDataImpl>(new detail::WeatherDataImpl(Tambt, barpres, windspd, winddir, relhum, daytyp, uTa, ubP, uws, uwd))) {
}

WeatherData::WeatherData(const WeatherData& other) = default;

Expand Down
3 changes: 1 addition & 2 deletions src/alfalfa/AlfalfaJSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <x>
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/energyplus/ReverseTranslator/ReverseTranslateZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand Down
2 changes: 1 addition & 1 deletion src/energyplus/Test/EnergyPlusFixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void EnergyPlusFixture::SetUpTestSuite() {
}
}
} // for iterator over directory
} // foreach component
} // foreach component
}

void EnergyPlusFixture::TearDownTestSuite() {
Expand Down
9 changes: 3 additions & 6 deletions src/epjson/epJSONTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ const std::string& toJSONFieldName(std::map<std::string, std::string>& 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;

Expand Down Expand Up @@ -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];
Expand Down
8 changes: 3 additions & 5 deletions src/generateiddfactory/GenerateIddFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,16 +375,15 @@ 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';
} else {
std::cout << std::setw(25) << " " << '\n';
}
} // for
} // if
} // if

} // for

Expand Down Expand Up @@ -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';
}
Expand Down
3 changes: 1 addition & 2 deletions src/generateiddfactory/IddFileFactoryData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
3 changes: 1 addition & 2 deletions src/gltf/GltfForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void(double)> updatePercentage, const path& outputPath) {
Expand Down
6 changes: 2 additions & 4 deletions src/install_utility/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
2 changes: 1 addition & 1 deletion src/isomodel/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2268,4 +2268,4 @@ namespace isomodel {
} // namespace isomodel
// isomodel
} // namespace openstudio
// openstudio
// openstudio
3 changes: 1 addition & 2 deletions src/isomodel/SimModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/measure/OSArgument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/measure/OSMeasureInfoGetter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
7 changes: 3 additions & 4 deletions src/model/AirConditionerVariableRefrigerantFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down
4 changes: 2 additions & 2 deletions src/model/AirTerminalSingleDuctConstantVolumeReheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/model/AirTerminalSingleDuctParallelPIUReheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/model/AirTerminalSingleDuctVAVNoReheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading

0 comments on commit b3d2e94

Please sign in to comment.