From dee8ecbd0225889c90e5f08f72a6e3f152f4760a Mon Sep 17 00:00:00 2001 From: mmusich Date: Wed, 15 Mar 2023 21:23:16 +0100 Subject: [PATCH] direct initialization of subdetfound and subdettotal --- .../plugins/SiStripHitEfficiencyHarvester.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc index fd9ffc9eab6f3..6758675c647ea 100644 --- a/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc +++ b/CalibTracker/SiStripHitEfficiency/plugins/SiStripHitEfficiencyHarvester.cc @@ -500,13 +500,8 @@ void SiStripHitEfficiencyHarvester::printTotalStatistics( int totalfound = 0; int totaltotal = 0; double layereff; - int subdetfound[5]; - int subdettotal[5]; - - for (unsigned int i = 1; i < 5; i++) { - subdetfound[i] = 0; - subdettotal[i] = 0; - } + int subdetfound[5] = {0, 0, 0, 0, 0}; + int subdettotal[5] = {0, 0, 0, 0, 0}; for (unsigned int i = 1; i <= bounds::k_LayersAtTECEnd; i++) { layereff = double(layerFound[i]) / double(layerTotal[i]);