Skip to content

Commit 5107f8e

Browse files
committed
scope
1 parent 649be3f commit 5107f8e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/EnergyPlus/NodeInputManager.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,9 +675,8 @@ int AssignNodeNumber(EnergyPlusData &state,
675675
ShowFatalError(state, "AssignNodeNumber: Preceding issue causes termination.");
676676
}
677677

678-
int NumNode = 0;
679678
if (state.dataNodeInputMgr->NumOfUniqueNodeNames > 0) {
680-
NumNode = Util::FindItemInList(
679+
int NumNode = Util::FindItemInList(
681680
Name, state.dataLoopNodes->NodeID({1, state.dataNodeInputMgr->NumOfUniqueNodeNames}), state.dataNodeInputMgr->NumOfUniqueNodeNames);
682681
if (NumNode > 0) {
683682
AssignNodeNumber = NumNode;
@@ -758,13 +757,13 @@ int GetOnlySingleNode(EnergyPlusData &state,
758757
static constexpr std::string_view RoutineName("GetOnlySingleNode: ");
759758

760759
int NumNodes;
761-
int NumParams;
762-
int NumAlphas;
763-
int NumNums;
764760

765761
std::string_view const objTypeStr = BranchNodeConnections::ConnectionObjectTypeNames[static_cast<int>(NodeObjectType)];
766762

767763
if (state.dataNodeInputMgr->GetOnlySingleNodeFirstTime) {
764+
int NumParams;
765+
int NumAlphas;
766+
int NumNums;
768767
state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, "NodeList", NumParams, NumAlphas, NumNums);
769768
state.dataNodeInputMgr->GetOnlySingleNodeNodeNums.dimension(NumParams, 0);
770769
state.dataNodeInputMgr->GetOnlySingleNodeFirstTime = false;

src/EnergyPlus/NonZoneEquipmentManager.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ namespace NonZoneEquipmentManager {
109109
using WaterUse::SimulateWaterUse;
110110

111111
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
112-
int WaterHeaterNum; // Water heater object number
113112
auto &CountNonZoneEquip = state.dataGlobal->CountNonZoneEquip;
114113

115114
if (CountNonZoneEquip) {
@@ -121,7 +120,7 @@ namespace NonZoneEquipmentManager {
121120
SimulateWaterUse(state, FirstHVACIteration); // simulate non-plant loop water use.
122121

123122
if (!state.dataGlobal->ZoneSizingCalc) {
124-
for (WaterHeaterNum = 1; WaterHeaterNum <= state.dataGlobal->NumOfWaterHeater; ++WaterHeaterNum) {
123+
for (int WaterHeaterNum = 1; WaterHeaterNum <= state.dataGlobal->NumOfWaterHeater; ++WaterHeaterNum) {
125124
SimulateWaterHeaterStandAlone(state, WaterHeaterNum, FirstHVACIteration);
126125
}
127126
}

0 commit comments

Comments
 (0)