mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5748
b350726
boost: update obsolete usage of endian API (moneromooo-monero)
This commit is contained in:
commit
a8e99198bf
4 changed files with 8 additions and 7 deletions
|
@ -22,7 +22,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/archive/basic_archive.hpp>
|
#include <boost/archive/basic_archive.hpp>
|
||||||
#include <boost/detail/endian.hpp>
|
#include <boost/predef/other/endian.h>
|
||||||
|
|
||||||
#include <boost/archive/impl/archive_serializer_map.ipp>
|
#include <boost/archive/impl/archive_serializer_map.ipp>
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ public:
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/detail/endian.hpp>
|
#include <boost/predef/other/endian.h>
|
||||||
#include <boost/serialization/throw_exception.hpp>
|
#include <boost/serialization/throw_exception.hpp>
|
||||||
#include <boost/archive/archive_exception.hpp>
|
#include <boost/archive/archive_exception.hpp>
|
||||||
|
|
||||||
|
@ -252,12 +252,12 @@ portable_binary_iarchive::load_impl(boost::intmax_t & l, char maxsize){
|
||||||
);
|
);
|
||||||
|
|
||||||
char * cptr = reinterpret_cast<char *>(& l);
|
char * cptr = reinterpret_cast<char *>(& l);
|
||||||
#ifdef BOOST_BIG_ENDIAN
|
#if BOOST_ENDIAN_BIG_BYTE
|
||||||
cptr += (sizeof(boost::intmax_t) - size);
|
cptr += (sizeof(boost::intmax_t) - size);
|
||||||
#endif
|
#endif
|
||||||
this->primitive_base_t::load_binary(cptr, size);
|
this->primitive_base_t::load_binary(cptr, size);
|
||||||
|
|
||||||
#ifdef BOOST_BIG_ENDIAN
|
#if BOOST_ENDIAN_BIG_BYTE
|
||||||
if(m_flags & endian_little)
|
if(m_flags & endian_little)
|
||||||
#else
|
#else
|
||||||
if(m_flags & endian_big)
|
if(m_flags & endian_big)
|
||||||
|
|
|
@ -221,7 +221,7 @@ public:
|
||||||
// See http://www.boost.org for updates, documentation, and revision history.
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <boost/detail/endian.hpp>
|
#include <boost/predef/other/endian.h>
|
||||||
|
|
||||||
namespace boost { namespace archive {
|
namespace boost { namespace archive {
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ portable_binary_oarchive::save_impl(
|
||||||
else
|
else
|
||||||
ll = l;
|
ll = l;
|
||||||
char * cptr = reinterpret_cast<char *>(& ll);
|
char * cptr = reinterpret_cast<char *>(& ll);
|
||||||
#ifdef BOOST_BIG_ENDIAN
|
#if BOOST_ENDIAN_BIG_BYTE
|
||||||
cptr += (sizeof(boost::intmax_t) - size);
|
cptr += (sizeof(boost::intmax_t) - size);
|
||||||
if(m_flags & endian_little)
|
if(m_flags & endian_little)
|
||||||
reverse_bytes(size, cptr);
|
reverse_bytes(size, cptr);
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <boost/predef/other/endian.h>
|
||||||
#include <boost/endian/conversion.hpp>
|
#include <boost/endian/conversion.hpp>
|
||||||
#include <boost/range/algorithm/equal.hpp>
|
#include <boost/range/algorithm/equal.hpp>
|
||||||
#include <boost/range/algorithm_ext/iota.hpp>
|
#include <boost/range/algorithm_ext/iota.hpp>
|
||||||
|
@ -135,7 +136,7 @@ namespace
|
||||||
EXPECT_FALSE( lhs >= rhs ); \
|
EXPECT_FALSE( lhs >= rhs ); \
|
||||||
EXPECT_TRUE( rhs >= lhs )
|
EXPECT_TRUE( rhs >= lhs )
|
||||||
|
|
||||||
#ifdef BOOST_LITTLE_ENDIAN
|
#if BOOST_ENDIAN_LITTLE_BYTE
|
||||||
#define CHECK_LESS_ENDIAN(lhs, rhs) CHECK_LESS( rhs , lhs )
|
#define CHECK_LESS_ENDIAN(lhs, rhs) CHECK_LESS( rhs , lhs )
|
||||||
#else
|
#else
|
||||||
#define CHECK_LESS_ENDIAN(lhs, rhs) CHECK_LESS( lhs , rhs )
|
#define CHECK_LESS_ENDIAN(lhs, rhs) CHECK_LESS( lhs , rhs )
|
||||||
|
|
Loading…
Reference in a new issue