-
Notifications
You must be signed in to change notification settings - Fork 396
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 ZoneTempPredCorr #10698
CppCheck ZoneTempPredCorr #10698
Conversation
@@ -335,7 +331,6 @@ void GetZoneAirSetPoints(EnergyPlusData &state) | |||
auto &ComfortTStatObjects = state.dataZoneCtrls->ComfortTStatObjects; | |||
auto &ComfortControlledZone = state.dataZoneCtrls->ComfortControlledZone; | |||
int NumOfZones = state.dataGlobal->NumOfZones; | |||
auto &StageControlledZone = state.dataZoneCtrls->StageControlledZone; |
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.
Why eliminate this bad array shortcut and not the other ones around it?
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.
Because this change eliminated a CppCheck style suggestion and reducing these takes time and risks diffs when a mistake is made. These are the types of changes that will occur after reducing the number of suggestions to a manageable level.
@@ -2788,10 +2761,6 @@ void InitZoneAirSetPoints(EnergyPlusData &state) | |||
static constexpr std::string_view RoutineName("InitZoneAirSetpoints: "); | |||
|
|||
// SUBROUTINE LOCAL VARIABLE DECLARATIONS: | |||
bool FirstSurfFlag; | |||
int TRefFlag; // Flag for Reference Temperature process in Zones | |||
|
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.
Why eliminate this bad array reference shortcut and not the others?
@@ -3969,14 +3935,14 @@ void ZoneSpaceHeatBalanceData::calcPredictedHumidityRatio(EnergyPlusData &state, | |||
|
|||
if (offsetThermostat != 0.0) { | |||
// Calculate the humidistat offset value from the thermostat offset value | |||
faultZoneWHumidifyingSetPoint = Psychrometrics::PsyWFnTdbRhPb( | |||
double faultZoneWHumidifyingSetPoint = Psychrometrics::PsyWFnTdbRhPb( |
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.
Use Real64 instead of double.
…Check-ZoneTempPredCorr
And again, all happy locally. Merging this as well. Thanks @rraustad |
Pull request overview
NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.