From 5f52974860a9fc62ec5e7c56853156fed01b3aed Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Sun, 12 Jan 2014 17:58:56 +0100 Subject: Retain compiler warning state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added push and pop pragma warning statements. Suppression of warnings should not propagate to user code. Therefore, suppression of warnings is restricted to the file where it is used. Change-Id: Ib7973cbc0205ebbe75e002d035e44fd9b447460f Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qvector.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qvector.h') diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 505e1a32e4..075e8e83e8 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -254,7 +254,10 @@ private: }; #ifdef Q_CC_MSVC -# pragma warning ( disable : 4345 ) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized +// behavior change: an object of POD type constructed with an initializer of the form () +// will be default-initialized +# pragma warning ( push ) +# pragma warning ( disable : 4345 ) #endif template @@ -270,7 +273,7 @@ void QVector::defaultConstruct(T *from, T *to) } #ifdef Q_CC_MSVC -# pragma warning ( default: 4345 ) +# pragma warning ( pop ) #endif template -- cgit v1.2.3