From eabe7b801d7469ab9b261f84bc154f523ed62720 Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta <Lorenzo.Moneta@cern.ch> Date: Fri, 3 Apr 2009 14:10:51 +0000 Subject: [PATCH] fix a warning observed on VC9 when sorting using Long64 indices (see http://root.cern.ch/phpBB2/viewtopic.php?t=8319) git-svn-id: http://root.cern.ch/svn/root/trunk@28094 27541ba8-7e3a-0410-8455-c3a389f83636 --- math/mathcore/inc/TMath.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/math/mathcore/inc/TMath.h b/math/mathcore/inc/TMath.h index ce0365c4fcb..c8474b5f920 100644 --- a/math/mathcore/inc/TMath.h +++ b/math/mathcore/inc/TMath.h @@ -548,7 +548,8 @@ struct CompareDesc { CompareDesc(T d) : fData(d) {} - bool operator()(int i1, int i2) { + template<typename Index> + bool operator()(Index i1, Index i2) { return *(fData + i1) > *(fData + i2); } @@ -560,7 +561,8 @@ struct CompareAsc { CompareAsc(T d) : fData(d) {} - bool operator()(int i1, int i2) { + template<typename Index> + bool operator()(Index i1, Index i2) { return *(fData + i1) < *(fData + i2); } -- GitLab