MSVC: Silence warning about right shift by too large amount
Silence the MSVC warning that got introduced in commit 62b752b3a2
:
warning C4333: '>>' : right shift by too large amount, data loss
qdebug.cpp(316) : see reference to function template instantiation 'void putEscapedString<uchar>(QTextStreamPrivate *,const Char *,int,bool)' being compiled
with
[
Char=uchar
]
qdebug.cpp(270) : warning C4333: '>>' : right shift by too large amount, data loss
Change-Id: If1ee20b741feae3287a8d6a11c202b4296d429fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
a373ffcda9
commit
463c559962
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2014 Intel Corporation.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
@ -263,12 +263,8 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, in
|
||||
// improperly-paired surrogates, fall through
|
||||
}
|
||||
buf[1] = 'u';
|
||||
if (sizeof(Char) == 1) {
|
||||
buf[2] = buf[3] = '0';
|
||||
} else {
|
||||
buf[2] = toHexUpper(*p >> 12);
|
||||
buf[3] = toHexUpper(*p >> 8);
|
||||
}
|
||||
buf[2] = toHexUpper(ushort(*p) >> 12);
|
||||
buf[3] = toHexUpper(ushort(*p) >> 8);
|
||||
buf[4] = toHexUpper(*p >> 4);
|
||||
buf[5] = toHexUpper(*p);
|
||||
buflen = 6;
|
||||
|
Loading…
Reference in New Issue
Block a user