From db65392b95690bf0a6c7e6279f1aa2b0692098c4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Aug 2014 12:47:32 +0000 Subject: [PATCH] Disable a harmless deprecation MSVC warning for wxNORMAL in a test. Explicitly disable the warning just for the code using wxNORMAL as the use of this deprecated constant can't be avoided in the code which tests for its support. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/font/fonttest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/font/fonttest.cpp b/tests/font/fonttest.cpp index 7e6197a33f..b0ab6aaf71 100644 --- a/tests/font/fonttest.cpp +++ b/tests/font/fonttest.cpp @@ -107,9 +107,20 @@ void FontTestCase::Construct() wxFONTWEIGHT_NORMAL).IsOk() ); #if WXWIN_COMPATIBILITY_3_0 + // Disable the warning about deprecated wxNORMAL as we use it here + // intentionally. + #ifdef __VISUALC__ + #pragma warning(push) + #pragma warning(disable:4996) + #endif + // Tests relying on the soon-to-be-deprecated ctor taking ints and not // wxFontXXX enum elements. CPPUNIT_ASSERT( wxFont(10, wxDEFAULT, wxNORMAL, wxNORMAL).IsOk() ); + + #ifdef __VISUALC__ + #pragma warning(pop) + #endif #endif // WXWIN_COMPATIBILITY_3_0 }