[Bf-blender-cvs] [5f613f7] master: OCIO: Disable the warnings related on C4251

Sergey Sharybin noreply at git.blender.org
Sat Feb 20 14:07:28 CET 2016


Commit: 5f613f7b5da945909cdcb452ccec477e20074046
Author: Sergey Sharybin
Date:   Sat Feb 20 13:45:01 2016 +0500
Branches: master
https://developer.blender.org/rB5f613f7b5da945909cdcb452ccec477e20074046

OCIO: Disable the warnings related on C4251

Those warnings are trigerred by stl classes in OCIO's public interface.

To quote MSDN: "C4251 can be ignored if you are deriving from a type in
the Standard C++ Library"

This is the only instance where those warnings hunts us, so for now we
can keep it all local in intern/opencolorio but this might be changed
in the future.

===================================================================

M	intern/opencolorio/ocio_impl.cc
M	intern/opencolorio/ocio_impl_glsl.cc

===================================================================

diff --git a/intern/opencolorio/ocio_impl.cc b/intern/opencolorio/ocio_impl.cc
index bf55900..82536a7 100644
--- a/intern/opencolorio/ocio_impl.cc
+++ b/intern/opencolorio/ocio_impl.cc
@@ -29,7 +29,14 @@
 #include <sstream>
 #include <string.h>
 
+#ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable : 4251 4275)
+#endif
 #include <OpenColorIO/OpenColorIO.h>
+#ifdef _MSC_VER
+#  pragma warning(pop)
+#endif
 
 using namespace OCIO_NAMESPACE;
 
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index 42bd20d..bf91ea1 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -39,7 +39,15 @@
 
 #include "glew-mx.h"
 
+#ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable : 4251 4275)
+#endif
 #include <OpenColorIO/OpenColorIO.h>
+#ifdef _MSC_VER
+#  pragma warning(pop)
+#endif
+
 
 using namespace OCIO_NAMESPACE;




More information about the Bf-blender-cvs mailing list