65 for (
int i = 0; i <
size ; ++i) dest[i] = src[size - 1 - i];
74 template <
typename T>
inline void qbswap(
const T
src, uchar *dest)
76 qbswap_helper(reinterpret_cast<const uchar *>(&src), dest,
sizeof(T));
83 qMemCopy(dest, &src,
sizeof(T));
111 | src[3] *
quint32(0x01000000);
121 inline qint64 qFromLittleEndian_helper(
const uchar *
src,
qint64 * dest)
122 {
return static_cast<qint64>(qFromLittleEndian_helper(src, reinterpret_cast<quint64*>(0))); }
123 inline qint32 qFromLittleEndian_helper(
const uchar *src,
qint32 * dest)
124 {
return static_cast<qint32>(qFromLittleEndian_helper(src, reinterpret_cast<quint32*>(0))); }
125 inline qint16 qFromLittleEndian_helper(
const uchar *src,
qint16 * dest)
126 {
return static_cast<qint16>(qFromLittleEndian_helper(src, reinterpret_cast<quint16*>(0))); }
130 return qFromLittleEndian_helper(src, reinterpret_cast<T*>(0));
154 | src[3] *
quint32(0x01000000);
180 inline quint64 qFromBigEndian_helper(
const uchar *src,
quint64 *dest)
193 inline quint32 qFromBigEndian_helper(
const uchar *src,
quint32 * dest)
199 | src[0] *
quint32(0x01000000);
202 inline quint16 qFromBigEndian_helper(
const uchar *src,
quint16 * des)
210 inline qint64 qFromBigEndian_helper(
const uchar *src,
qint64 * dest)
211 {
return static_cast<qint64>(qFromBigEndian_helper(src, reinterpret_cast<quint64*>(0))); }
212 inline qint32 qFromBigEndian_helper(
const uchar *src,
qint32 * dest)
213 {
return static_cast<qint32>(qFromBigEndian_helper(src, reinterpret_cast<quint32*>(0))); }
214 inline qint16 qFromBigEndian_helper(
const uchar *src,
qint16 * dest)
215 {
return static_cast<qint16>(qFromBigEndian_helper(src, reinterpret_cast<quint16*>(0))); }
219 return qFromBigEndian_helper(src, reinterpret_cast<T*>(0));
245 | src[0] *
quint32(0x01000000);
305 | ((
source & 0x000000ff) << 24)
306 | ((
source & 0x0000ff00) << 8)
307 | ((
source & 0x00ff0000) >> 8)
308 | ((
source & 0xff000000) >> 24);
314 | ((
source & 0x00ff) << 8)
315 | ((
source & 0xff00) >> 8) );
335 #if Q_BYTE_ORDER == Q_BIG_ENDIAN
342 {
return qbswap<T>(
source); }
344 {
return qbswap<T>(
source); }
345 template <
typename T>
inline void qToBigEndian(T src, uchar *dest)
346 { qToUnaligned<T>(
src, dest); }
348 { qbswap<T>(
src, dest); }
349 #else // Q_LITTLE_ENDIAN
352 {
return qbswap<T>(
source); }
354 {
return qbswap<T>(
source); }
360 { qbswap<T>(
src, dest); }
362 { qToUnaligned<T>(
src, dest); }
364 #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
GLsizei GLsizei GLchar * source
quint64 qFromLittleEndian< quint64 >(const uchar *src)
quint64 qbswap< quint64 >(quint64 source)
void qbswap(const T src, uchar *dest)
quint16 qFromLittleEndian< quint16 >(const uchar *src)
T qFromBigEndian(const uchar *src)
qint16 qbswap< qint16 >(qint16 source)
quint32 qFromBigEndian< quint32 >(const uchar *src)
qint64 qFromLittleEndian< qint64 >(const uchar *src)
qint64 qbswap< qint64 >(qint64 source)
unsigned long long quint64
#define QT_BEGIN_NAMESPACE
void qToUnaligned(const T src, uchar *dest)
quint32 qFromLittleEndian< quint32 >(const uchar *src)
qint16 qFromBigEndian< qint16 >(const uchar *src)
QT_BEGIN_HEADER QT_BEGIN_NAMESPACE void qbswap_helper(const uchar *src, uchar *dest, int size)
qint32 qFromLittleEndian< qint32 >(const uchar *src)
quint8 qbswap< quint8 >(quint8 source)
qint32 qFromBigEndian< qint32 >(const uchar *src)
quint16 qFromBigEndian< quint16 >(const uchar *src)
quint64 qFromBigEndian< quint64 >(const uchar *src)
qint64 qFromBigEndian< qint64 >(const uchar *src)
qint32 qbswap< qint32 >(qint32 source)
qint16 qFromLittleEndian< qint16 >(const uchar *src)
quint32 qbswap< quint32 >(quint32 source)
quint16 qbswap< quint16 >(quint16 source)
T qToLittleEndian(T source)
T qFromLittleEndian(const uchar *src)