diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-03-21 18:09:09 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-25 13:12:24 +0200 |
commit | fe778b94bd58c12949d763f428d214e8c16d144e (patch) | |
tree | 878c41fcc5f18a33d57c34a27cc69f0eb940bb7e /src/corelib/arch | |
parent | 552e162a67a1afcdc4e3e344100abaa6a69ab918 (diff) |
Enable endianness conversions on q(u)int8
Lack of support for these types is not a real issue as endian
conversions on byte-sized types are no-ops. Still, the conversions are
useful as they facilitate writing of generic code. They can also be used
explicitly as a way to document in code an endian-specific binary
format:
uchar *data;
quint8 tag = qFromLittleEndian<quint8>(data++);
quint32 size = qFromLittleEndian<quint32>(data);
This commit also adds a test for functions documented in the QtEndian
header.
Change-Id: I2f6c876ce89d2adb8c03a1c8a25921d225bf6f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/arch')
0 files changed, 0 insertions, 0 deletions