From 74dc231da199c82e7107c03f922a455a02ecf6e3 Mon Sep 17 00:00:00 2001 From: Joseph C Wang <joequant@gmail.com> Date: Mon, 19 Oct 2020 07:25:54 +0800 Subject: [PATCH] fix not in range compile error Clupatra/clupatra_new.cpp calls not in range with negative number and current unsigned template causes compile error. --- Reconstruction/Tracking/src/Clupatra/NNClusterer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Reconstruction/Tracking/src/Clupatra/NNClusterer.h b/Reconstruction/Tracking/src/Clupatra/NNClusterer.h index 2055d99c..990169c3 100644 --- a/Reconstruction/Tracking/src/Clupatra/NNClusterer.h +++ b/Reconstruction/Tracking/src/Clupatra/NNClusterer.h @@ -15,11 +15,11 @@ namespace nnclu { /** fast check if integer is in a given range [Min,Max] */ - template <unsigned Min,unsigned Max > + template <int Min, int Max > inline bool inRange( int i){ return ( (unsigned int) ( i - Min ) <= (unsigned int) ( Max - Min ) ); } /** fast check if integer is not in a given range [Min,Max] */ - template <unsigned Min,unsigned Max > + template <int Min, int Max > inline bool notInRange( int i){ return ( (unsigned int) ( i - Min ) > (unsigned int) ( Max - Min ) ); } -- GitLab