-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CppCheck FluidProperties through HVACUnitaryBypassVAV #10668
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1035,7 +1035,7 @@ namespace FluidProperties { | |
continue; | ||
} | ||
|
||
auto &supTempArray = FluidTemps(supTempArrayNum); | ||
auto const &supTempArray = FluidTemps(supTempArrayNum); | ||
refrig->NumSupTempPoints = supTempArray.NumOfTemps; | ||
refrig->SupTemps.allocate(refrig->NumSupTempPoints); | ||
refrig->SupTemps = supTempArray.Temps; | ||
|
@@ -1441,7 +1441,7 @@ namespace FluidProperties { | |
|
||
if (!glycolRaw->CpTempArrayName.empty()) { | ||
int cpTempArrayNum = Util::FindItemInList(glycolRaw->CpTempArrayName, FluidTemps); | ||
auto &cpTempArray = FluidTemps(cpTempArrayNum); | ||
auto const &cpTempArray = FluidTemps(cpTempArrayNum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:1444]:(style),[constVariable],Variable 'cpTempArray' can be declared as reference to const |
||
glycolRaw->NumCpTempPoints = cpTempArray.NumOfTemps; | ||
glycolRaw->CpTemps.allocate(glycolRaw->NumCpTempPoints); | ||
glycolRaw->CpTemps = cpTempArray.Temps; | ||
|
@@ -1452,7 +1452,7 @@ namespace FluidProperties { | |
|
||
if (!glycolRaw->RhoTempArrayName.empty()) { | ||
int rhoTempArrayNum = Util::FindItemInList(glycolRaw->RhoTempArrayName, FluidTemps); | ||
auto &rhoTempArray = FluidTemps(rhoTempArrayNum); | ||
auto const &rhoTempArray = FluidTemps(rhoTempArrayNum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:1455]:(style),[constVariable],Variable 'rhoTempArray' can be declared as reference to const |
||
glycolRaw->NumRhoTempPoints = rhoTempArray.NumOfTemps; | ||
glycolRaw->RhoTemps.allocate(glycolRaw->NumRhoTempPoints); | ||
glycolRaw->RhoTemps = rhoTempArray.Temps; | ||
|
@@ -1463,7 +1463,7 @@ namespace FluidProperties { | |
|
||
if (!glycolRaw->CondTempArrayName.empty()) { | ||
int condTempArrayNum = Util::FindItemInList(glycolRaw->CondTempArrayName, FluidTemps); | ||
auto &condTempArray = FluidTemps(condTempArrayNum); | ||
auto const &condTempArray = FluidTemps(condTempArrayNum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:1466]:(style),[constVariable],Variable 'condTempArray' can be declared as reference to const |
||
glycolRaw->NumCondTempPoints = condTempArray.NumOfTemps; | ||
glycolRaw->CondTemps.allocate(glycolRaw->NumCondTempPoints); | ||
glycolRaw->CondTemps = condTempArray.Temps; | ||
|
@@ -1474,7 +1474,7 @@ namespace FluidProperties { | |
|
||
if (!glycolRaw->ViscTempArrayName.empty()) { | ||
int viscTempArrayNum = Util::FindItemInList(glycolRaw->ViscTempArrayName, FluidTemps); | ||
auto &viscTempArray = FluidTemps(viscTempArrayNum); | ||
auto const &viscTempArray = FluidTemps(viscTempArrayNum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:1477]:(style),[constVariable],Variable 'viscTempArray' can be declared as reference to const |
||
glycolRaw->NumViscTempPoints = viscTempArray.NumOfTemps; | ||
glycolRaw->ViscTemps.allocate(glycolRaw->NumViscTempPoints); | ||
glycolRaw->ViscTemps = viscTempArray.Temps; | ||
|
@@ -1936,7 +1936,7 @@ namespace FluidProperties { | |
// Most properties requested (e.g., Specific Heat) must be > 0 but the tables may | ||
// be set up for symmetry and not be limited to just valid values. | ||
|
||
auto &df = state.dataFluidProps; | ||
auto const &df = state.dataFluidProps; | ||
|
||
for (auto *glycol : df->glycols) { | ||
if (glycol->CpDataPresent) { | ||
|
@@ -2039,7 +2039,7 @@ namespace FluidProperties { | |
// for the refrigerant properties. | ||
// Most properties requested (e.g., Specific Heat) must be > 0 but the tables may | ||
// be set up for symmetry and not be limited to just valid values. | ||
auto &df = state.dataFluidProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we were not supposed to reference a class? Maybe this is different. I can easily put these back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A class/struct is about the only thing you should reference, what you shouldn't reference is scalars and arrays. |
||
auto const &df = state.dataFluidProps; | ||
|
||
for (auto *refrig : df->refrigs) { | ||
for (int IndexNum = 1; IndexNum <= refrig->NumPsPoints; ++IndexNum) { | ||
|
@@ -2181,7 +2181,7 @@ namespace FluidProperties { | |
Real64 Temperature; // Temperature to drive values | ||
Real64 ReturnValue; // Values returned from glycol functions | ||
|
||
auto &df = state.dataFluidProps; | ||
auto const &df = state.dataFluidProps; | ||
|
||
for (auto *glycol : df->glycols) { | ||
|
||
|
@@ -2423,7 +2423,7 @@ namespace FluidProperties { | |
Real64 Temperature; // Temperature to drive values | ||
Real64 ReturnValue; // Values returned from refrigerant functions | ||
|
||
auto &df = state.dataFluidProps; | ||
auto const &df = state.dataFluidProps; | ||
|
||
for (auto *refrig : df->refrigs) { | ||
// Lay out the basic values: | ||
|
@@ -2759,8 +2759,6 @@ namespace FluidProperties { | |
|
||
int LoTempIndex = FindArrayIndex(Temperature, this->PsTemps, this->PsLowTempIndex, this->PsHighTempIndex); | ||
|
||
auto &df = state.dataFluidProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why undo this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I'm seeing it right, it looks like this variable just got moved into a smaller scope, not undoing the reference usage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The references are staying in place (I put them all back in) and only moving if there was a CppCheck reduce scope suggestion. I do want to see CI results though because the Mac results are troubling. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to be clear, Mac results are not reliable right now. There is something very odd going on that I'm trying to investigate. Gort and Tik-Tok are doing fine though. |
||
|
||
// check for out of data bounds problems | ||
if (LoTempIndex == 0) { | ||
ReturnValue = this->PsValues(this->PsLowTempIndex); | ||
|
@@ -2778,6 +2776,8 @@ namespace FluidProperties { | |
|
||
if (!state.dataGlobal->WarmupFlag && ErrorFlag) { | ||
++this->errors[(int)RefrigError::SatTemp].count; | ||
auto &df = state.dataFluidProps; | ||
|
||
// send warning | ||
if (this->errors[(int)RefrigError::SatTemp].count <= df->RefrigErrorLimitTest) { | ||
ShowSevereMessage( | ||
|
@@ -2851,8 +2851,6 @@ namespace FluidProperties { | |
// FUNCTION LOCAL VARIABLE DECLARATIONS: | ||
bool ErrorFlag = false; // error flag for current call | ||
|
||
auto &df = state.dataFluidProps; | ||
|
||
// get the array indices | ||
int LoPresIndex = FindArrayIndex(Pressure, this->PsValues, this->PsLowPresIndex, this->PsHighPresIndex); | ||
|
||
|
@@ -2873,6 +2871,8 @@ namespace FluidProperties { | |
|
||
if (!state.dataGlobal->WarmupFlag && ErrorFlag) { | ||
++this->errors[(int)RefrigError::SatPress].count; | ||
auto &df = state.dataFluidProps; | ||
|
||
// send warning | ||
if (this->errors[(int)RefrigError::SatPress].count <= df->RefrigErrorLimitTest) { | ||
ShowSevereMessage(state, | ||
|
@@ -2995,8 +2995,6 @@ namespace FluidProperties { | |
// FUNCTION PARAMETER DEFINITIONS: | ||
static constexpr std::string_view routineName = "RefrigProps::getSatDensity"; | ||
|
||
auto &df = state.dataFluidProps; | ||
|
||
if ((Quality < 0.0) || (Quality > 1.0)) { | ||
ShowSevereError(state, fmt::format("{}Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); | ||
ShowContinueError(state, format("Saturated density quality must be between 0 and 1, entered value=[{:.4R}].", Quality)); | ||
|
@@ -3045,6 +3043,8 @@ namespace FluidProperties { | |
|
||
if (!state.dataGlobal->WarmupFlag && ErrorFlag) { | ||
++this->errors[(int)RefrigError::SatTempDensity].count; | ||
auto &df = state.dataFluidProps; | ||
|
||
// send warning | ||
if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) { | ||
ShowSevereMessage( | ||
|
@@ -3403,8 +3403,6 @@ namespace FluidProperties { | |
// the enthalpy calculated from the pressure found | ||
static constexpr std::string_view routineName = "RefrigProps::getSupHeatPressure"; | ||
|
||
auto &df = state.dataFluidProps; | ||
|
||
// SUBROUTINE LOCAL VARIABLE DECLARATIONS: | ||
Real64 EnthalpyCheck; // recalculates enthalpy based on calculated pressure | ||
Real64 EnthalpyHigh; // Enthalpy value at interpolated pressure and high temperature | ||
|
@@ -3542,6 +3540,8 @@ namespace FluidProperties { | |
} | ||
|
||
if (ErrCount > 0 && !state.dataGlobal->WarmupFlag) { | ||
auto &df = state.dataFluidProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:3406]:(style),[variableScope],The scope of the variable 'df' can be reduced. |
||
|
||
// send near saturation warning if flagged | ||
this->errors[(int)RefrigError::SatSupPress].count += CurSatErrCount; | ||
// send warning | ||
|
@@ -4593,7 +4593,7 @@ namespace FluidProperties { | |
|
||
int GetGlycolRawNum(EnergyPlusData &state, std::string_view const glycolRawName) // carries in substance name | ||
{ | ||
auto &df = state.dataFluidProps; | ||
auto const &df = state.dataFluidProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:4596]:(style),[constVariable],Variable 'df' can be declared as reference to const |
||
|
||
auto found = std::find_if(df->glycolsRaw.begin(), df->glycolsRaw.end(), [glycolRawName](GlycolRawProps const *glycolRaw) { | ||
return glycolRaw->Name == glycolRawName; | ||
|
@@ -4779,8 +4779,6 @@ namespace FluidProperties { | |
// Return value | ||
Real64 ReturnValue; | ||
|
||
auto &df = state.dataFluidProps; | ||
|
||
// error counters and dummy string | ||
bool ErrorFlag(false); // error flag for current call | ||
|
||
|
@@ -4811,6 +4809,8 @@ namespace FluidProperties { | |
} | ||
|
||
if (ErrorFlag && (CalledFrom != "ReportAndTestRefrigerants")) { | ||
auto &df = state.dataFluidProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:4782]:(style),[variableScope],The scope of the variable 'df' can be reduced. |
||
|
||
++df->TempRangeErrCountGetInterpolatedSatProp; | ||
// send warning | ||
if (df->TempRangeErrCountGetInterpolatedSatProp <= df->RefrigErrorLimitTest) { | ||
|
@@ -4832,7 +4832,7 @@ namespace FluidProperties { | |
|
||
//***************************************************************************** | ||
|
||
bool CheckFluidPropertyName(EnergyPlusData &state, | ||
bool CheckFluidPropertyName(EnergyPlusData const &state, | ||
std::string const &name) // Name from input(?) to be checked against valid FluidPropertyNames | ||
{ | ||
|
||
|
@@ -4842,7 +4842,7 @@ namespace FluidProperties { | |
|
||
// PURPOSE OF THIS FUNCTION: | ||
// This function checks on an input fluid property to make sure it is valid. | ||
auto &df = state.dataFluidProps; | ||
auto const &df = state.dataFluidProps; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/FluidProperties.cc:4845]:(style),[constVariable],Variable 'df' can be declared as reference to const |
||
|
||
auto foundRefrig = std::find_if(df->refrigs.begin(), df->refrigs.end(), [name](RefrigProps const *refrig) { return refrig->Name == name; }); | ||
if (foundRefrig != df->refrigs.end()) return true; | ||
|
@@ -4867,7 +4867,7 @@ namespace FluidProperties { | |
bool NeedOrphanMessage = true; | ||
int NumUnusedRefrig = 0; | ||
|
||
auto &df = state.dataFluidProps; | ||
auto const &df = state.dataFluidProps; | ||
|
||
for (auto const *refrig : df->refrigs) { | ||
if (refrig->used) continue; | ||
|
@@ -4913,18 +4913,18 @@ namespace FluidProperties { | |
void GetFluidDensityTemperatureLimits(EnergyPlusData &state, int const FluidIndex, Real64 &MinTempLimit, Real64 &MaxTempLimit) | ||
{ | ||
if (FluidIndex > 0) { | ||
auto &df = state.dataFluidProps; | ||
MinTempLimit = df->glycols(FluidIndex)->RhoLowTempValue; | ||
MaxTempLimit = df->glycols(FluidIndex)->RhoHighTempValue; | ||
auto const &df = state.dataFluidProps->glycols(FluidIndex); | ||
MinTempLimit = df->RhoLowTempValue; | ||
MaxTempLimit = df->RhoHighTempValue; | ||
} | ||
} | ||
|
||
void GetFluidSpecificHeatTemperatureLimits(EnergyPlusData &state, int const FluidIndex, Real64 &MinTempLimit, Real64 &MaxTempLimit) | ||
{ | ||
if (FluidIndex > 0) { | ||
auto &df = state.dataFluidProps; | ||
MinTempLimit = df->glycols(FluidIndex)->CpLowTempValue; | ||
MaxTempLimit = df->glycols(FluidIndex)->CpHighTempValue; | ||
auto const &df = state.dataFluidProps->glycols(FluidIndex); | ||
MinTempLimit = df->CpLowTempValue; | ||
MaxTempLimit = df->CpHighTempValue; | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2768,8 +2768,6 @@ namespace Furnaces { | |
// Get fan data | ||
FanName = Alphas(7); | ||
|
||
errFlag = false; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/Furnaces.cc:2793]:(style),[redundantAssignment],Variable 'errFlag' is reassigned a value before the old one has been used. |
||
thisFurnace.fanType = static_cast<HVAC::FanType>(getEnumValue(HVAC::fanTypeNamesUC, Alphas(6))); | ||
|
||
if (thisFurnace.fanType == HVAC::FanType::OnOff || thisFurnace.fanType == HVAC::FanType::Constant) { | ||
|
@@ -4739,11 +4737,7 @@ namespace Furnaces { | |
|
||
if (!state.dataGlobal->DoingSizing && state.dataFurnaces->MySecondOneTimeFlag(FurnaceNum)) { | ||
// sizing all done. check fan air flow rates | ||
errFlag = false; | ||
thisFurnace.ActualFanVolFlowRate = state.dataFans->fans(thisFurnace.FanIndex)->maxAirFlowRate; | ||
if (errFlag) { | ||
ShowContinueError(state, format("...occurs in {} ={}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/Furnaces.cc:4744]:(style),[knownConditionTrueFalse],Condition 'errFlag' is always false |
||
if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { | ||
if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { | ||
ShowWarningError(state, | ||
|
@@ -5001,11 +4995,11 @@ namespace Furnaces { | |
thisFurnace.CoolingSpeedRatio = thisFurnace.MaxCoolAirVolFlow / thisFurnace.ActualFanVolFlowRate; | ||
thisFurnace.NoHeatCoolSpeedRatio = thisFurnace.MaxNoCoolHeatAirVolFlow / thisFurnace.ActualFanVolFlowRate; | ||
} | ||
std::string FanName; // used in warning messages | ||
if (dynamic_cast<Fans::FanComponent *>(state.dataFans->fans(thisFurnace.FanIndex))->powerRatioAtSpeedRatioCurveNum > 0) { | ||
if (thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxHeatAirVolFlow && | ||
thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxCoolAirVolFlow && | ||
thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxNoCoolHeatAirVolFlow) { | ||
std::string FanName = state.dataFans->fans(thisFurnace.FanIndex)->Name; | ||
ShowWarningError(state, format("{} \"{}\"", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); | ||
ShowContinueError(state, | ||
format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)thisFurnace.fanType], FanName)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,7 @@ void UpdateHVACInterface(EnergyPlusData &state, | |
Real64 totDemandSideMaxAvail = 0.0; | ||
for (int demIn = 1; demIn <= state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).NumSupplyNodes; ++demIn) { | ||
int demInNode = state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).ZoneEquipSupplyNodeNum(demIn); | ||
auto &node = state.dataLoopNodes->Node(demInNode); | ||
auto const &node = state.dataLoopNodes->Node(demInNode); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACInterfaceManager.cc:126]:(style),[constVariable],Variable 'node' can be declared as reference to const |
||
totDemandSideMassFlow += node.MassFlowRate; | ||
totDemandSideMinAvail += node.MassFlowRateMinAvail; | ||
totDemandSideMaxAvail += node.MassFlowRateMaxAvail; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2051,7 +2051,7 @@ void ResolveLockoutFlags(EnergyPlusData &state, bool &SimAir) // TRUE means air | |
} | ||
} | ||
|
||
void ResetHVACControl(EnergyPlusData &state) | ||
void ResetHVACControl(EnergyPlusData const &state) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACManager.cc:2054]:(style),[constParameter],Parameter 'state' can be declared as reference to const |
||
{ | ||
|
||
// SUBROUTINE INFORMATION: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,8 +281,6 @@ void GetStandAloneERV(EnergyPlusData &state) | |
GlobalNames::IntraObjUniquenessCheck( | ||
state, Alphas(4), CurrentModuleObject, cAlphaFields(4), state.dataHVACStandAloneERV->SupplyAirFanUniqueNames, ErrorsFound); | ||
|
||
errFlag = false; | ||
|
||
if ((standAloneERV.SupplyAirFanIndex = Fans::GetFanIndex(state, standAloneERV.SupplyAirFanName)) == 0) { | ||
ShowSevereItemNotFound(state, eoh, cAlphaFields(4), standAloneERV.SupplyAirFanName); | ||
ErrorsFound = true; | ||
|
@@ -297,7 +295,6 @@ void GetStandAloneERV(EnergyPlusData &state) | |
standAloneERV.ExhaustAirFanName = Alphas(5); | ||
GlobalNames::IntraObjUniquenessCheck( | ||
state, Alphas(5), CurrentModuleObject, cAlphaFields(5), state.dataHVACStandAloneERV->ExhaustAirFanUniqueNames, ErrorsFound); | ||
errFlag = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACStandAloneERV.cc:300]:(style),[redundantAssignment],Variable 'errFlag' is reassigned a value before the old one has been used. |
||
|
||
if ((standAloneERV.ExhaustAirFanIndex = Fans::GetFanIndex(state, standAloneERV.ExhaustAirFanName)) == 0) { | ||
ShowSevereItemNotFound(state, eoh, cAlphaFields(5), standAloneERV.ExhaustAirFanName); | ||
|
@@ -1695,7 +1692,6 @@ int getEqIndex(EnergyPlusData &state, std::string_view CompName) | |
for (int StandAloneERVNum = 1; StandAloneERVNum <= state.dataHVACStandAloneERV->NumStandAloneERVs; StandAloneERVNum++) { | ||
if (Util::SameString(CompName, state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)) { | ||
return StandAloneERVNum; | ||
break; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACStandAloneERV.cc:1698]:(style),[duplicateBreak],Consecutive return, break, continue, goto or throw statements are unnecessary. |
||
} | ||
} | ||
return 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -330,7 +330,6 @@ namespace HVACUnitaryBypassVAV { | |
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine | ||
bool DXErrorsFound(false); // Set to true if errors in get coil input | ||
Array1D_int OANodeNums(4); // Node numbers of OA mixer (OA, EA, RA, MA) | ||
std::string HXDXCoolCoilName; // Name of DX cooling coil used with Heat Exchanger Assisted Cooling Coil | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACUnitaryBypassVAV.cc:333]:(style),[unusedVariable],Unused variable: HXDXCoolCoilName |
||
bool DXCoilErrFlag; // used in warning messages | ||
|
||
Array1D_string Alphas(20, ""); | ||
|
@@ -754,7 +753,7 @@ namespace HVACUnitaryBypassVAV { | |
ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); | ||
ErrorsFound = true; | ||
} else { | ||
auto &newCoil = state.dataCoilCooingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum]; | ||
auto const &newCoil = state.dataCoilCooingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACUnitaryBypassVAV.cc:757]:(style),[constVariable],Variable 'newCoil' can be declared as reference to const |
||
thisCBVAV.DXCoilInletNode = newCoil.evapInletNodeIndex; | ||
thisCBVAV.DXCoilOutletNode = newCoil.evapOutletNodeIndex; | ||
thisCBVAV.CondenserNodeNum = newCoil.condInletNodeIndex; | ||
|
@@ -2444,7 +2443,7 @@ namespace HVACUnitaryBypassVAV { | |
} | ||
// now find the speed ratio for the found speednum | ||
auto f = [&state, CBVAVNum, SpeedNum, DesOutTemp](Real64 const SpeedRatio) { | ||
auto &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum); | ||
auto const &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [src/EnergyPlus/HVACUnitaryBypassVAV.cc:2447]:(style),[constVariable],Variable 'thisCBVAV' can be declared as reference to const |
||
// FUNCTION LOCAL VARIABLE DECLARATIONS: | ||
Real64 OutletAirTemp; // outlet air temperature [C] | ||
Real64 QZnReqCycling = 0.001; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[src/EnergyPlus/FluidProperties.cc:1038]:(style),[constVariable],Variable 'supTempArray' can be declared as reference to const