Skip to content

Commit 4c242de

Browse files
authored
fixup comparison bug
1 parent 824a75e commit 4c242de

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hist/hist/src/THLimitsFinder.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Int_t THLimitsFinder::FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax, Doubl
8383
TAxis *xaxis = h->GetXaxis();
8484
TAxis *yaxis = h->GetYaxis();
8585

86-
const Bool_t xbinAuto = newbinsx != 0;
87-
const Bool_t ybinAuto = newbinsy != 0;
86+
const Bool_t xbinAuto = newbinsx == 0;
87+
const Bool_t ybinAuto = newbinsy == 0;
8888

8989
if (xbinAuto && xmin >= xmax) {
9090
if (xaxis->GetLabels()) {xmin = 0; xmax = xmin +xaxis->GetNbins();}
@@ -122,9 +122,9 @@ Int_t THLimitsFinder::FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax, Doubl
122122
TAxis *yaxis = h->GetYaxis();
123123
TAxis *zaxis = h->GetZaxis();
124124

125-
const Bool_t xbinAuto = newbinsx != 0;
126-
const Bool_t ybinAuto = newbinsy != 0;
127-
const Bool_t zbinAuto = newbinsz != 0;
125+
const Bool_t xbinAuto = newbinsx == 0;
126+
const Bool_t ybinAuto = newbinsy == 0;
127+
const Bool_t zbinAuto = newbinsz == 0;
128128

129129
if (xbinAuto && xmin >= xmax) {
130130
if (xaxis->GetLabels()) {xmin = 0; xmax = xmin +xaxis->GetNbins();}

0 commit comments

Comments
 (0)