Prevent warning in swapOrder(uint16 value)

This commit is contained in:
Martchus 2017-06-03 17:16:52 +02:00
parent 5e67a9b691
commit 06f401b393
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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);
}
/*!