Skip to content

Commit 78802f4

Browse files
author
Max Zhao
committed
Fixed variable size array Clang compilation bug
1 parent 182848e commit 78802f4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

DQM/L1TMonitor/src/L1TCaloLayer1Summary.cc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,17 @@ void L1TCaloLayer1Summary::analyze(const edm::Event& iEvent, const edm::EventSet
4545
}
4646
int matrixSize = maxEtaIdx + 1;
4747

48-
bool foundMatrix[2][matrixSize][matrixSize] = {};
49-
int etMatrix[2][matrixSize][matrixSize] = {};
48+
bool foundMatrix[2][matrixSize][matrixSize];
49+
int etMatrix[2][matrixSize][matrixSize];
50+
for (int i = 0; i < 2; i++) {
51+
for (int j = 0; j < matrixSize; j++) {
52+
for (int k = 0; k < matrixSize; k++) {
53+
foundMatrix[i][j][k] = false;
54+
etMatrix[i][j][k] = 0;
55+
}
56+
}
57+
}
58+
5059
for (int iRegion = 0; iRegion < nRegions; iRegion++) {
5160
L1CaloRegion cRegion = caloLayer1Regions[iRegion];
5261
L1CaloRegion sRegion = simRegions[iRegion];

0 commit comments

Comments
 (0)