Prechádzať zdrojové kódy

Merge pull request #3336 from RichardTea/issue-3332_msvc2017

Use #ifdef _MSC_VER for pragma warnings (Issue 3332)
Kim Kulling 5 rokov pred
rodič
commit
a2186a0553

+ 7 - 2
code/AssetLib/3DS/3DSHelper.h

@@ -321,9 +321,10 @@ public:
 struct Face : public FaceWithSmoothingGroup {
 };
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
+#pragma warning(push)
 #pragma warning(disable : 4315)
-#endif
+#endif // _MSC_VER
 
 // ---------------------------------------------------------------------------
 /** Helper structure representing a texture */
@@ -412,6 +413,10 @@ struct Texture {
 
 #include <assimp/Compiler/poppack1.h>
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif // _MSC_VER
+
 // ---------------------------------------------------------------------------
 /** Helper structure representing a 3ds material */
 struct Material {

+ 7 - 2
code/AssetLib/IFC/IFCReaderGen_2x3.h

@@ -45,9 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "AssetLib/Step/STEPFile.h"
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
+#    pragma warning(push)
 #    pragma warning( disable : 4512 )
-#endif // _WIN32
+#endif // _MSC_VER
 
 namespace Assimp {
 namespace IFC {
@@ -4372,4 +4373,8 @@ namespace STEP {
 } //! STEP
 } //! Assimp
 
+#ifdef _MSC_VER
+#    pragma warning(pop)
+#endif // _MSC_VER
+
 #endif // INCLUDED_IFC_READER_GEN_H

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 431 - 431
code/AssetLib/M3D/m3d.h


+ 2 - 2
code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp

@@ -68,9 +68,9 @@ namespace Assimp {
 namespace MDL {
 namespace HalfLife {
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
 #    pragma warning(disable : 4706)
-#endif // _WIN32
+#endif // _MSC_VER
 
 // ------------------------------------------------------------------------------------------------
 HL1MDLLoader::HL1MDLLoader(

+ 4 - 4
code/AssetLib/Step/STEPFile.h

@@ -54,10 +54,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <assimp/DefaultLogger.hpp>
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
 #    pragma warning(push)
 #    pragma warning(disable : 4127 4456 4245 4512 )
-#endif // _WIN32 
+#endif // _MSC_VER 
 
 //
 #if _MSC_VER > 1500 || (defined __GNUC___)
@@ -960,9 +960,9 @@ private:
     const EXPRESS::ConversionSchema *schema;
 };
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
 #pragma warning(pop)
-#endif // _WIN32
+#endif // _MSC_VER
 
 } // namespace STEP
 

+ 2 - 2
code/Common/Exporter.cpp

@@ -74,9 +74,9 @@ Here we implement only the C++ interface (Assimp::Exporter).
 
 namespace Assimp {
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
 #    pragma warning( disable : 4800 )
-#endif // _WIN32
+#endif // _MSC_VER
 
 
 // PostStepRegistry.cpp

+ 2 - 2
code/Common/Subdivision.cpp

@@ -53,9 +53,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using namespace Assimp;
 void mydummy() {}
 
-#if _MSC_VER > 1920
+#ifdef _MSC_VER
 #pragma warning(disable : 4709)
-#endif // _WIN32
+#endif // _MSC_VER
 // ------------------------------------------------------------------------------------------------
 /** Subdivider stub class to implement the Catmull-Clarke subdivision algorithm. The
  *  implementation is basing on recursive refinement. Directly evaluating the result is also

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov