From 1b5831d45bbd1eebdd189b9cb3cc4fd8edf095e7 Mon Sep 17 00:00:00 2001 From: sgorbuno <se.gorbunov@gsi.de> Date: Mon, 16 Nov 2020 12:39:35 +0000 Subject: [PATCH] rewrite of an intended fall through in case{..} in order to avoid a compiler warning --- .../dielectron/papaframework/PairAnalysisHistos.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/analysis/PWGDIL/dielectron/papaframework/PairAnalysisHistos.cxx b/analysis/PWGDIL/dielectron/papaframework/PairAnalysisHistos.cxx index e5429fd298..55b2aabc22 100644 --- a/analysis/PWGDIL/dielectron/papaframework/PairAnalysisHistos.cxx +++ b/analysis/PWGDIL/dielectron/papaframework/PairAnalysisHistos.cxx @@ -2068,14 +2068,11 @@ void PairAnalysisHistos::StoreVariables(TH1* obj, UInt_t valType[20]) { dim++; } - switch (dim) { - case 4: obj->SetUniqueID(valType[3]); // Tprofile3D variable - case 3: obj->GetZaxis()->SetUniqueID(valType[2]); - case 2: obj->GetYaxis()->SetUniqueID(valType[1]); - case 1: - obj->GetXaxis()->SetUniqueID(valType[0]); - // fall through is intended - } + if (dim >= 1) { obj->GetXaxis()->SetUniqueID(valType[0]); } + if (dim >= 2) { obj->GetYaxis()->SetUniqueID(valType[1]); } + if (dim >= 3) { obj->GetZaxis()->SetUniqueID(valType[2]); } + // Tprofile3D variable + if (dim >= 4) { obj->SetUniqueID(valType[3]); } return; } -- GitLab