Commit 924570c3 authored by Micha Mueller's avatar Micha Mueller
Browse files

Fix warnings caused by dcdbendian.h using deprecated BOOST macros

parent b4035c1f
......@@ -27,7 +27,7 @@
#ifndef DCDBENDIAN_H
#define DCDBENDIAN_H
#include <boost/predef/detail/endian_compat.h>
#include <boost/predef/other/endian.h>
#include <stdint.h>
/* Check if we can use any optimized byte swap implementation */
......@@ -71,9 +71,9 @@ public:
}
static inline uint16_t hostToBE(uint16_t x) {
#if defined BOOST_BIG_ENDIAN
#if defined BOOST_ENDIAN_BIG_BYTE
return x;
#elif defined BOOST_LITTLE_ENDIAN
#elif defined BOOST_ENDIAN_LITTLE_BYTE
return swap(x);
#else
# error Endianess of host is undefined!
......@@ -81,9 +81,9 @@ public:
}
static inline uint32_t hostToBE(uint32_t x) {
#if defined BOOST_BIG_ENDIAN
#if defined BOOST_ENDIAN_BIG_BYTE
return x;
#elif defined BOOST_LITTLE_ENDIAN
#elif defined BOOST_ENDIAN_LITTLE_BYTE
return swap(x);
#else
# error Endianess of host is undefined!
......@@ -91,9 +91,9 @@ public:
}
static inline uint64_t hostToBE(uint64_t x) {
#if defined BOOST_BIG_ENDIAN
#if defined BOOST_ENDIAN_BIG_BYTE
return x;
#elif defined BOOST_LITTLE_ENDIAN
#elif defined BOOST_ENDIAN_LITTLE_BYTE
return swap(x);
#else
# error Endianess of host is undefined!
......@@ -101,9 +101,9 @@ public:
}
static inline uint16_t hostToLE(uint16_t x) {
#if defined BOOST_BIG_ENDIAN
#if defined BOOST_ENDIAN_BIG_BYTE
return swap(x);
#elif defined BOOST_LITTLE_ENDIAN
#elif defined BOOST_ENDIAN_LITTLE_BYTE
return x;
#else
# error Endianess of host is undefined!
......@@ -111,9 +111,9 @@ public:
}
static inline uint32_t hostToLE(uint32_t x) {
#if defined BOOST_BIG_ENDIAN
#if defined BOOST_ENDIAN_BIG_BYTE
return swap(x);
#elif defined BOOST_LITTLE_ENDIAN
#elif defined BOOST_ENDIAN_LITTLE_BYTE
return x;
#else
# error Endianess of host is undefined!
......@@ -121,9 +121,9 @@ public:
}
static inline uint64_t hostToLE(uint64_t x) {
#if defined BOOST_BIG_ENDIAN
#if defined BOOST_ENDIAN_BIG_BYTE
return swap(x);
#elif defined BOOST_LITTLE_ENDIAN
#elif defined BOOST_ENDIAN_LITTLE_BYTE
return x;
#else
# error Endianess of host is undefined!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment