From 96a5a57f442deeec59b273e45533420ed35bb847 Mon Sep 17 00:00:00 2001 From: Salavat Date: Thu, 20 Jun 2019 06:30:31 +0200 Subject: [PATCH] improving style --- CalibFormats/HcalObjects/src/HcalDbService.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CalibFormats/HcalObjects/src/HcalDbService.cc b/CalibFormats/HcalObjects/src/HcalDbService.cc index d4ff9b9ec4df7..bfd8637a346aa 100644 --- a/CalibFormats/HcalObjects/src/HcalDbService.cc +++ b/CalibFormats/HcalObjects/src/HcalDbService.cc @@ -225,10 +225,11 @@ bool HcalDbService::convertPedestalWidths(const HcalGenericDetId& fId, continue; } float y = pedestal->getValues()[i]; - int x1 = (int)std::floor(y); - int x2 = (int)std::floor(y + 1.); - float y1 = coder->charge(*shape, x1, i); - float y2 = coder->charge(*shape, x2, i); + unsigned x1 = static_cast(std::floor(y)); + unsigned x2 = static_cast(std::floor(y + 1.)); + unsigned iun = static_cast(i); + float y1 = coder->charge(*shape, x1, iun); + float y2 = coder->charge(*shape, x2, iun); pedTrueWidth[i] = (y2 - y1) * x; } return true;