QStaticByteArrayMatcher: fix MSVC warning
MSVC 2013 complained:
src/corelib/tools/qbytearraymatcher.h(143) : warning C4351: new behavior: elements of array 'QStaticByteArrayMatcher<6>::m_pattern' will be default initialized
Fix the same way as 9a07ab9234
: by suppressing
the warning.
Change-Id: Ic41f7eabe7e39709d76e6062f5891cdcfaa6e1ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
b952bd3605
commit
2cda991ab1
@ -132,6 +132,9 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_MSVC(4351) // MSVC 2013: "new behavior: elements of array ... will be default initialized"
|
||||
// remove once we drop MSVC 2013 support
|
||||
template <uint N>
|
||||
class QStaticByteArrayMatcher : QStaticByteArrayMatcherBase
|
||||
{
|
||||
@ -153,6 +156,8 @@ public:
|
||||
QByteArray pattern() const { return QByteArray(m_pattern, int(N - 1)); }
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
template <uint N>
|
||||
Q_DECL_RELAXED_CONSTEXPR QStaticByteArrayMatcher<N> qMakeStaticByteArrayMatcher(const char (&pattern)[N]) Q_DECL_NOTHROW
|
||||
{ return QStaticByteArrayMatcher<N>(pattern); }
|
||||
|
Loading…
Reference in New Issue
Block a user