diff --git a/scripts/compareRootFiles.hpp b/scripts/compareRootFiles.hpp index a6cf18bbb4ee5d9f40ced2708c9eb9a6798844ac..5f21b713824168be06a9b33566c3d27f02c13a5b 100644 --- a/scripts/compareRootFiles.hpp +++ b/scripts/compareRootFiles.hpp @@ -108,9 +108,9 @@ compare(const T& x, const T& y) } // ...but we'll want to tweak that a little for floats, to handle NaNs better... -template <> +template <typename T> Ordering -compare(const float& x, const float& y) +compareFloat(const T& x, const T& y) { if (std::isless(x, y)) { return Ordering::SMALLER; @@ -121,6 +121,19 @@ compare(const float& x, const float& y) } } +template<> +Ordering +compare(const float& x, const float& y) +{ + return compareFloat(x, y); +} + +template<> +Ordering +compare(const double& x, const double& y) { + return compareFloat(x, y); +} + // ...and for vectors, where the default lexicographic comparison cannot // efficiently tell all of what we want in a single vector iteration pass. template <typename U>