Skip to content

Commit e9d852d

Browse files
committed
Determine removed BOOST_BYTE_ORDER in sample.h
1 parent b3dd749 commit e9d852d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/sample.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,8 @@
1212
#include <string>
1313
#include <type_traits>
1414

15-
#ifndef BOOST_BYTE_ORDER
16-
#if BOOST_ENDIAN_BIG_BYTE
17-
const int BOOST_BYTE_ORDER = 4321;
18-
#elif BOOST_ENDIAN_LITTLE_BYTE
19-
const int BOOST_BYTE_ORDER = 1234;
20-
#elif BOOST_ENDIAN_LITTLE_WORD
21-
const int BOOST_BYTE_ORDER = 2134;
22-
#endif
23-
#endif
15+
const int BOOST_BYTE_ORDER =
16+
lslboost::endian::order::native == lslboost::endian::order::little ? 4321 : 1234;
2417

2518
// Boost.Endian has no functions to reverse floats, so we pretend they're ints of the same size.
2619
template <typename T> inline void endian_reverse_inplace(T &t) {

0 commit comments

Comments
 (0)