@@ -119,7 +119,7 @@ template <const unsigned int size, const char* labels[size]>
119119void Counter<size, labels>::Print()
120120{
121121 for (unsigned int i = 0 ; i < size; i++) {
122- if (labels) {
122+ if (labels != nullptr ) {
123123 LOG (DEBUG ) << " Bin " << i << " /" << size - 1 << " " << labels[i] << " = " << HowMany (i);
124124 } else {
125125 LOG (DEBUG ) << " Bin " << i << " /" << size - 1 << " = " << HowMany (i);
@@ -163,7 +163,7 @@ void Counter<size, labels>::MakeHistogram(TH1* h) const
163163 }
164164 h->Reset ();
165165 unsigned int histo_size = size;
166- if (labels) { // Only if labels are defined
166+ if (labels != nullptr ) { // Only if labels are defined
167167 for (unsigned int i = 0 ; i < size; i++) {
168168 if (labels[i] && !labels[i][0 ]) { // If label at position i is empty
169169 LOG (DEBUG ) << " Skipping label '" << labels[i] << " ' at position " << i << " /" << size - 1 ;
@@ -178,7 +178,7 @@ void Counter<size, labels>::MakeHistogram(TH1* h) const
178178 }
179179
180180 axis->Set (histo_size, 0 , histo_size);
181- if (labels) { // Only if labels are defined
181+ if (labels != nullptr ) { // Only if labels are defined
182182 unsigned int binx = 1 ;
183183 for (unsigned int i = 0 ; i < size; i++) {
184184 if (labels[i] && !labels[i][0 ]) { // If label at position i is empty
@@ -204,7 +204,7 @@ void Counter<size, labels>::FillHistogram(TH1* h, const unsigned int& biny, cons
204204 unsigned int binx = 1 ;
205205 const unsigned int nbinsx = h->GetNbinsX ();
206206 for (unsigned int i = 0 ; i < size; i++) {
207- if (labels && labels[i] && !labels[i][0 ]) { // Labels are defined and label is empty
207+ if (labels != nullptr && labels[i] && !labels[i][0 ]) { // Labels are defined and label is empty
208208 if (counter[i] > 0 ) {
209209 LOG (FATAL ) << " Counter at position " << i << " was non empty (" << counter[i] << " ) but was discarded because of empty labels" ;
210210 }
@@ -217,7 +217,7 @@ void Counter<size, labels>::FillHistogram(TH1* h, const unsigned int& biny, cons
217217 LOG (FATAL ) << " Filling histogram " << h->GetName () << " at position " << binx << " i.e. past its size (" << nbinsx << " )!" ;
218218 }
219219 const char * bin_label = h->GetXaxis ()->GetBinLabel (binx);
220- if (labels) {
220+ if (labels != nullptr ) {
221221 if (!labels[i]) {
222222 LOG (DEBUG ) << " Label at position " << i << " does not exist for axis label '" << bin_label << " '" ;
223223 } else if (strcmp (labels[i], bin_label) != 0 ) {
0 commit comments