From c6201f2d70c932e8872fc24d1275c9afdc6588cc Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 14 Jul 2014 16:03:03 +0000 Subject: [PATCH] completing in place swapping macros git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/wx/defs.h b/include/wx/defs.h index 6c532e24f1..6a47a26245 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1526,12 +1526,21 @@ typedef double wxDouble; #define wxUINT64_SWAP_ON_LE(val) (val) #define wxINT64_SWAP_ON_BE(val) wxINT64_SWAP_ALWAYS(val) #define wxINT64_SWAP_ON_LE(val) (val) + + #define wxUINT64_SWAP_ON_BE_IN_PLACE(val) val = wxUINT64_SWAP_ALWAYS(val) + #define wxINT64_SWAP_ON_BE_IN_PLACE(val) val = wxINT64_SWAP_ALWAYS(val) + #define wxUINT64_SWAP_ON_LE_IN_PLACE(val) + #define wxINT64_SWAP_ON_LE_IN_PLACE(val) #endif #define wxUINT16_SWAP_ON_BE_IN_PLACE(val) val = wxUINT16_SWAP_ALWAYS(val) + #define wxINT16_SWAP_ON_BE_IN_PLACE(val) val = wxINT16_SWAP_ALWAYS(val) #define wxUINT16_SWAP_ON_LE_IN_PLACE(val) + #define wxINT16_SWAP_ON_LE_IN_PLACE(val) #define wxUINT32_SWAP_ON_BE_IN_PLACE(val) val = wxUINT32_SWAP_ALWAYS(val) + #define wxINT32_SWAP_ON_BE_IN_PLACE(val) val = wxINT32_SWAP_ALWAYS(val) #define wxUINT32_SWAP_ON_LE_IN_PLACE(val) + #define wxINT32_SWAP_ON_LE_IN_PLACE(val) #else #define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val) #define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val) @@ -1546,12 +1555,20 @@ typedef double wxDouble; #define wxUINT64_SWAP_ON_BE(val) (val) #define wxINT64_SWAP_ON_LE(val) wxINT64_SWAP_ALWAYS(val) #define wxINT64_SWAP_ON_BE(val) (val) + #define wxUINT64_SWAP_ON_BE_IN_PLACE(val) + #define wxINT64_SWAP_ON_BE_IN_PLACE(val) + #define wxUINT64_SWAP_ON_LE_IN_PLACE(val) val = wxUINT64_SWAP_ALWAYS(val) + #define wxINT64_SWAP_ON_LE_IN_PLACE(val) val = wxINT64_SWAP_ALWAYS(val) #endif #define wxUINT16_SWAP_ON_BE_IN_PLACE(val) + #define wxINT16_SWAP_ON_BE_IN_PLACE(val) #define wxUINT16_SWAP_ON_LE_IN_PLACE(val) val = wxUINT16_SWAP_ALWAYS(val) + #define wxINT16_SWAP_ON_LE_IN_PLACE(val) val = wxINT16_SWAP_ALWAYS(val) #define wxUINT32_SWAP_ON_BE_IN_PLACE(val) + #define wxINT32_SWAP_ON_BE_IN_PLACE(val) #define wxUINT32_SWAP_ON_LE_IN_PLACE(val) val = wxUINT32_SWAP_ALWAYS(val) + #define wxINT32_SWAP_ON_LE_IN_PLACE(val) val = wxINT32_SWAP_ALWAYS(val) #endif /* ---------------------------------------------------------------------------- */