Move the hex digits out of _q_toHex

Avoids them being duplicated several times in QtCore

Change-Id: Idee0168ed9d452a572ad46e2a14d2d4d3c7d2f7e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Thiago Macieira 2014-05-11 11:54:54 -07:00 committed by The Qt Project
parent 8e5e9d7987
commit 5b4c0da9d0
1 changed files with 2 additions and 2 deletions

View File

@ -50,11 +50,11 @@
#endif
QT_BEGIN_NAMESPACE
static const char digits[] = "0123456789abcdef";
template <class Char, class Integral>
void _q_toHex(Char *&dst, Integral value)
{
static const char digits[] = "0123456789abcdef";
value = qToBigEndian(value);
const char* p = reinterpret_cast<const char*>(&value);