diff --git a/BaseCommon/Utils.h b/BaseCommon/Utils.h index 0e60527..549392f 100644 --- a/BaseCommon/Utils.h +++ b/BaseCommon/Utils.h @@ -87,4 +87,14 @@ public: return u; } + + // Ersatz for macro wxINT32_SWAP_ON_LE + template + static T swap_endian_le(T u) + { + if(!is_big_endian()) + return swap_endian(u); + + return u; + } };