From 4415714434f5b61055ee71077569dc3b47f73ebe Mon Sep 17 00:00:00 2001 From: drakmor Date: Tue, 1 Mar 2016 15:33:12 +0300 Subject: [PATCH] Move fix issue #410 to VS include file. --- common/compiler/vs/disable_silly_warnings.h | 5 +++++ core/video_format.cpp | 5 ++--- modules/image/producer/image_producer.cpp | 3 --- unit-test/param_test.cpp | 3 --- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/common/compiler/vs/disable_silly_warnings.h b/common/compiler/vs/disable_silly_warnings.h index 0866ef7a3..8996c740e 100644 --- a/common/compiler/vs/disable_silly_warnings.h +++ b/common/compiler/vs/disable_silly_warnings.h @@ -32,5 +32,10 @@ #pragma warning (disable : 4505) // unreferenced local function has been #pragma warning (disable : 4481) // nonstandard extension used: override specifier 'override' #pragma warning (disable : 4996) // function call with parameters that may be unsafe + +#if (_MSC_VER > 1800 && _MSC_FULL_VER >= 190023506) + #pragma warning( disable : 4592) // symbol will be dynamically initialized (implementation limitation). Bug in VS2015 14.0.24720.00 Update 1 +#endif + #endif diff --git a/core/video_format.cpp b/core/video_format.cpp index eb9b4bcc3..792afb462 100644 --- a/core/video_format.cpp +++ b/core/video_format.cpp @@ -26,8 +26,7 @@ #include namespace caspar { namespace core { -#pragma warning( push ) -#pragma warning( disable : 4592) + const std::vector format_descs = { { video_format::pal, 720, 576, 1024, 576, field_mode::upper, 25, 1, L"PAL", { 1920 } }, { video_format::ntsc, 720, 486, 720, 540, field_mode::lower, 30000, 1001, L"NTSC", { 1602, 1601, 1602, 1601, 1602 } }, @@ -67,7 +66,7 @@ namespace caspar { namespace core { { video_format::dci2160p2500, 4096, 2160, 4096, 2160, field_mode::progressive, 25, 1, L"dci2160p2500", { 1920 } }, { video_format::invalid, 0, 0, 0, 0, field_mode::progressive, 1, 1, L"invalid", { 1 } } }; -#pragma warning( pop ) + video_format_desc::video_format_desc( video_format format, int width, diff --git a/modules/image/producer/image_producer.cpp b/modules/image/producer/image_producer.cpp index fa72eccf4..92f805145 100644 --- a/modules/image/producer/image_producer.cpp +++ b/modules/image/producer/image_producer.cpp @@ -185,8 +185,6 @@ void describe_producer(core::help_sink& sink, const core::help_repository& repo) sink.example(L">> PLAY 1-10 [PNG_BASE64] data...", L"Plays a PNG image transferred as a base64 encoded string."); } -#pragma warning( push ) -#pragma warning( disable : 4592) static const auto g_extensions = { L".png", L".tga", @@ -201,7 +199,6 @@ static const auto g_extensions = { L".j2k", L".j2c" }; -#pragma warning( pop ) spl::shared_ptr create_producer(const core::frame_producer_dependencies& dependencies, const std::vector& params) { diff --git a/unit-test/param_test.cpp b/unit-test/param_test.cpp index d858c5f16..76dcdea28 100644 --- a/unit-test/param_test.cpp +++ b/unit-test/param_test.cpp @@ -26,12 +26,9 @@ #include namespace { -#pragma warning( push ) -#pragma warning( disable : 4592) static auto params = { L"param1", L"1", L"param2", L"string value" }; -#pragma warning( pop ) } namespace caspar { -- 2.39.2