From 06f401b3932b09fb83157a763304c0e3a5127f78 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 3 Jun 2017 17:16:52 +0200 Subject: [PATCH] Prevent warning in swapOrder(uint16 value) --- CMakeLists.txt | 2 +- conversion/binaryconversion.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a0b8b3..40733e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,7 +122,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities") set(META_VERSION_MAJOR 4) set(META_VERSION_MINOR 8) -set(META_VERSION_PATCH 0) +set(META_VERSION_PATCH 1) # find required 3rd party libraries include(3rdParty) diff --git a/conversion/binaryconversion.h b/conversion/binaryconversion.h index 29565d9..698a517 100644 --- a/conversion/binaryconversion.h +++ b/conversion/binaryconversion.h @@ -152,7 +152,7 @@ CPP_UTILITIES_EXPORT constexpr uint32 toNormalInt(uint32 synchsafeInt) */ CPP_UTILITIES_EXPORT constexpr uint16 swapOrder(uint16 value) { - return (value >> 8) | (value << 8); + return ((value >> 8) & 0x00FF) | ((value << 8) & 0xFF00); } /*!