Prevent warning in swapOrder(uint16 value)

testing/bash_completion_debugging
Martchus 6 years ago
parent 5e67a9b691
commit 06f401b393
  1. 2
      CMakeLists.txt
  2. 2
      conversion/binaryconversion.h

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

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

Loading…
Cancel
Save