From 30e4ec41601f55db5b064e9c8780bb43b0f47214 Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Wed, 15 May 2024 10:41:05 +0200 Subject: [PATCH] changed the position of the define near to where it is needed --- src/tools/MergeVectorTools.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tools/MergeVectorTools.h b/src/tools/MergeVectorTools.h index 05e593f435..7cf18aef08 100644 --- a/src/tools/MergeVectorTools.h +++ b/src/tools/MergeVectorTools.h @@ -26,12 +26,7 @@ #include #include #include -#ifdef __NVCOMPILER -#define PLMDAUTO typename C::value_type -#else -//I prefer letting gcc doing his work -#define PLMDAUTO auto -#endif + namespace PLMD { namespace mergeVectorTools { @@ -56,6 +51,12 @@ static void mergeSortedVectors(const C* const* vecs, std::size_t size, std::vect /// to allow using a priority_queu, which selects the highest element. /// we here (counterintuitively) define < as > bool operator< (Entry const& rhs) const { return top() > rhs.top(); } +#ifdef __NVCOMPILER +#define PLMDAUTO typename C::value_type +#else +//I prefer letting gcc doing his work +#define PLMDAUTO auto +#endif const PLMDAUTO & top() const { return *fwdIt; } void next() { ++fwdIt;}; };