forked from boostorg/endian
Add convenience store functions
This commit is contained in:
1 parent
22d0d7bcd1
commit
4054afda70
3 files changed
+434
No files matched your search
@@ -534,6 +534,160 @@ inline boost::uint64_t load_big_u64( unsigned char const * p ) BOOST_NOEXCEPT
|
||||
return boost::endian::endian_load<boost::uint64_t, 8, order::big>( p );
|
||||
}
|
||||
|
||||
// store 16
|
||||
|
||||
inline void store_little_s16( unsigned char * p, boost::int16_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int16_t, 2, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u16( unsigned char * p, boost::uint16_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint16_t, 2, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s16( unsigned char * p, boost::int16_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int16_t, 2, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u16( unsigned char * p, boost::uint16_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint16_t, 2, order::big>( p, v );
|
||||
}
|
||||
|
||||
// store 24
|
||||
|
||||
inline void store_little_s24( unsigned char * p, boost::int32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int32_t, 3, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u24( unsigned char * p, boost::uint32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint32_t, 3, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s24( unsigned char * p, boost::int32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int32_t, 3, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u24( unsigned char * p, boost::uint32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint32_t, 3, order::big>( p, v );
|
||||
}
|
||||
|
||||
// store 32
|
||||
|
||||
inline void store_little_s32( unsigned char * p, boost::int32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int32_t, 4, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u32( unsigned char * p, boost::uint32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint32_t, 4, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s32( unsigned char * p, boost::int32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int32_t, 4, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u32( unsigned char * p, boost::uint32_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint32_t, 4, order::big>( p, v );
|
||||
}
|
||||
|
||||
// store 40
|
||||
|
||||
inline void store_little_s40( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 5, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u40( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 5, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s40( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 5, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u40( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 5, order::big>( p, v );
|
||||
}
|
||||
|
||||
// store 48
|
||||
|
||||
inline void store_little_s48( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 6, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u48( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 6, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s48( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 6, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u48( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 6, order::big>( p, v );
|
||||
}
|
||||
|
||||
// store 56
|
||||
|
||||
inline void store_little_s56( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 7, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u56( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 7, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s56( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 7, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u56( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 7, order::big>( p, v );
|
||||
}
|
||||
|
||||
// store 64
|
||||
|
||||
inline void store_little_s64( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 8, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_little_u64( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 8, order::little>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_s64( unsigned char * p, boost::int64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::int64_t, 8, order::big>( p, v );
|
||||
}
|
||||
|
||||
inline void store_big_u64( unsigned char * p, boost::uint64_t v )
|
||||
{
|
||||
boost::endian::endian_store<boost::uint64_t, 8, order::big>( p, v );
|
||||
}
|
||||
|
||||
} // namespace endian
|
||||
} // namespace boost
|
||||
|
||||
|
||||
Reference in new issue
Block a user