Skip to content

Commit 770a284

Browse files
silverweedvepadulano
authored andcommitted
avoid shadowing params in AreBitwiseEqual
1 parent 950e0dd commit 770a284

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

root/io/cpp11Containers/commonUtils.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ bool IsSame<>(const TH1F& a, const TH1F& b){
198198
if (gVerboseComparison) std::cout << "The # of bins of the histograms differ: " << nbinsa << " " << nbinsb << std::endl;
199199
return false;
200200
}
201-
const auto AreBitwiseEqual = [](auto a, auto b) {
202-
ULong64_t la, lb;
203-
memcpy(&la, &a, sizeof(a));
204-
memcpy(&lb, &b, sizeof(b));
205-
return la == lb;
201+
const auto AreBitwiseEqual = [](auto x, auto y) {
202+
ULong64_t lx, ly;
203+
memcpy(&lx, &x, sizeof(x));
204+
memcpy(&ly, &y, sizeof(y));
205+
return lx == ly;
206206
};
207207
for (int i=0;i<a.GetNbinsX();++i) {
208208
auto binca = a.GetBinContent(i);

0 commit comments

Comments
 (0)