From 443c6449788b856c97c49785705901893c7731fb Mon Sep 17 00:00:00 2001 From: charras Date: Thu, 30 Oct 2008 11:41:06 +0000 Subject: [PATCH] return to EXCHG macro (some equivalent inline functions do not work ) --- include/macros.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/macros.h b/include/macros.h index c7fd25029e..377ef98a4d 100644 --- a/include/macros.h +++ b/include/macros.h @@ -53,6 +53,11 @@ /****************************************/ /* inline functions to exchange 2 items */ /****************************************/ + +#if 1 +#define EXCHG( a, b ) { typeof(a) __temp__ = (a); (a) = (b); (b) = __temp__; } + +#else static inline void EXCHG( int a, int b ) { int temp = a; @@ -126,6 +131,9 @@ static inline void EXCHG( const D_PAD* a, const D_PAD* b ) a = b; b = temp; }; + +#endif + /*****************************************************/ /* inline functions to insert menuitems with a icon: */ /*****************************************************/