Merge branch 'master' into issue-3334_cl_D9025
commit
162c8be184
|
@ -258,7 +258,11 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
|
||||||
SET(LIBSTDC++_LIBRARIES -lstdc++)
|
SET(LIBSTDC++_LIBRARIES -lstdc++)
|
||||||
ELSEIF(MSVC)
|
ELSEIF(MSVC)
|
||||||
# enable multi-core compilation with MSVC
|
# enable multi-core compilation with MSVC
|
||||||
ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX )
|
IF( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) # clang-cl
|
||||||
|
ADD_COMPILE_OPTIONS(/bigobj /W4 /WX )
|
||||||
|
ELSE() # msvc
|
||||||
|
ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX)
|
||||||
|
ENDIF()
|
||||||
# disable "elements of array '' will be default initialized" warning on MSVC2013
|
# disable "elements of array '' will be default initialized" warning on MSVC2013
|
||||||
IF(MSVC12)
|
IF(MSVC12)
|
||||||
ADD_COMPILE_OPTIONS(/wd4351)
|
ADD_COMPILE_OPTIONS(/wd4351)
|
||||||
|
|
|
@ -321,9 +321,10 @@ public:
|
||||||
struct Face : public FaceWithSmoothingGroup {
|
struct Face : public FaceWithSmoothingGroup {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4315)
|
#pragma warning(disable : 4315)
|
||||||
#endif
|
#endif // _MSC_VER
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
/** Helper structure representing a texture */
|
/** Helper structure representing a texture */
|
||||||
|
@ -412,6 +413,10 @@ struct Texture {
|
||||||
|
|
||||||
#include <assimp/Compiler/poppack1.h>
|
#include <assimp/Compiler/poppack1.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif // _MSC_VER
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
/** Helper structure representing a 3ds material */
|
/** Helper structure representing a 3ds material */
|
||||||
struct Material {
|
struct Material {
|
||||||
|
|
|
@ -386,7 +386,14 @@ void BlenderTessellatorP2T::ReferencePoints( std::vector< Blender::PointP2T >& p
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const
|
inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const
|
||||||
{
|
{
|
||||||
|
#if defined __clang__
|
||||||
|
# pragma clang diagnostic push
|
||||||
|
# pragma clang diagnostic ignored "-Winvalid-offsetof"
|
||||||
|
#endif // __clang__
|
||||||
unsigned int pointOffset = offsetof( PointP2T, point2D );
|
unsigned int pointOffset = offsetof( PointP2T, point2D );
|
||||||
|
#if defined __clang__
|
||||||
|
# pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset );
|
PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset );
|
||||||
if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) )
|
if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) )
|
||||||
{
|
{
|
||||||
|
@ -394,7 +401,6 @@ inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& poi
|
||||||
}
|
}
|
||||||
return pointStruct;
|
return pointStruct;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderTessellatorP2T::MakeFacesFromTriangles( std::vector< p2t::Triangle* >& triangles ) const
|
void BlenderTessellatorP2T::MakeFacesFromTriangles( std::vector< p2t::Triangle* >& triangles ) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,9 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "AssetLib/Step/STEPFile.h"
|
#include "AssetLib/Step/STEPFile.h"
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(push)
|
||||||
# pragma warning( disable : 4512 )
|
# pragma warning( disable : 4512 )
|
||||||
#endif // _WIN32
|
#endif // _MSC_VER
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace IFC {
|
namespace IFC {
|
||||||
|
@ -4372,4 +4373,8 @@ namespace STEP {
|
||||||
} //! STEP
|
} //! STEP
|
||||||
} //! Assimp
|
} //! Assimp
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif // _MSC_VER
|
||||||
|
|
||||||
#endif // INCLUDED_IFC_READER_GEN_H
|
#endif // INCLUDED_IFC_READER_GEN_H
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,9 +68,9 @@ namespace Assimp {
|
||||||
namespace MDL {
|
namespace MDL {
|
||||||
namespace HalfLife {
|
namespace HalfLife {
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
# pragma warning(disable : 4706)
|
# pragma warning(disable : 4706)
|
||||||
#endif // _WIN32
|
#endif // _MSC_VER
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
HL1MDLLoader::HL1MDLLoader(
|
HL1MDLLoader::HL1MDLLoader(
|
||||||
|
|
|
@ -54,10 +54,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
# pragma warning(disable : 4127 4456 4245 4512 )
|
# pragma warning(disable : 4127 4456 4245 4512 )
|
||||||
#endif // _WIN32
|
#endif // _MSC_VER
|
||||||
|
|
||||||
//
|
//
|
||||||
#if _MSC_VER > 1500 || (defined __GNUC___)
|
#if _MSC_VER > 1500 || (defined __GNUC___)
|
||||||
|
@ -130,8 +130,8 @@ namespace STEP {
|
||||||
* coupled with a line number. */
|
* coupled with a line number. */
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
struct SyntaxError : DeadlyImportError {
|
struct SyntaxError : DeadlyImportError {
|
||||||
enum {
|
enum : uint64_t {
|
||||||
LINE_NOT_SPECIFIED = 0xffffffffffffffffLL
|
LINE_NOT_SPECIFIED = 0xfffffffffffffffLL
|
||||||
};
|
};
|
||||||
|
|
||||||
SyntaxError(const std::string &s, uint64_t line = LINE_NOT_SPECIFIED);
|
SyntaxError(const std::string &s, uint64_t line = LINE_NOT_SPECIFIED);
|
||||||
|
@ -143,8 +143,8 @@ struct SyntaxError : DeadlyImportError {
|
||||||
* It is typically coupled with both an entity id and a line number.*/
|
* It is typically coupled with both an entity id and a line number.*/
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
struct TypeError : DeadlyImportError {
|
struct TypeError : DeadlyImportError {
|
||||||
enum {
|
enum : uint64_t {
|
||||||
ENTITY_NOT_SPECIFIED = 0xffffffffffffffffLL,
|
ENTITY_NOT_SPECIFIED = 0xffffffffffffffffUL,
|
||||||
ENTITY_NOT_SPECIFIED_32 = 0x00000000ffffffff
|
ENTITY_NOT_SPECIFIED_32 = 0x00000000ffffffff
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -960,9 +960,9 @@ private:
|
||||||
const EXPRESS::ConversionSchema *schema;
|
const EXPRESS::ConversionSchema *schema;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif // _WIN32
|
#endif // _MSC_VER
|
||||||
|
|
||||||
} // namespace STEP
|
} // namespace STEP
|
||||||
|
|
||||||
|
|
|
@ -1066,7 +1066,7 @@ endif()
|
||||||
|
|
||||||
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
|
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
|
||||||
|
|
||||||
if ( MSVC )
|
IF( MSVC OR "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC") # clang with MSVC ABI
|
||||||
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||||
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -74,9 +74,9 @@ Here we implement only the C++ interface (Assimp::Exporter).
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
# pragma warning( disable : 4800 )
|
# pragma warning( disable : 4800 )
|
||||||
#endif // _WIN32
|
#endif // _MSC_VER
|
||||||
|
|
||||||
|
|
||||||
// PostStepRegistry.cpp
|
// PostStepRegistry.cpp
|
||||||
|
|
|
@ -53,9 +53,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
void mydummy() {}
|
void mydummy() {}
|
||||||
|
|
||||||
#if _MSC_VER > 1920
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4709)
|
#pragma warning(disable : 4709)
|
||||||
#endif // _WIN32
|
#endif // _MSC_VER
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
/** Subdivider stub class to implement the Catmull-Clarke subdivision algorithm. The
|
/** Subdivider stub class to implement the Catmull-Clarke subdivision algorithm. The
|
||||||
* implementation is basing on recursive refinement. Directly evaluating the result is also
|
* implementation is basing on recursive refinement. Directly evaluating the result is also
|
||||||
|
|
|
@ -312,10 +312,22 @@
|
||||||
__pragma(warning(disable: warnings))
|
__pragma(warning(disable: warnings))
|
||||||
# define GTEST_DISABLE_MSC_WARNINGS_POP_() \
|
# define GTEST_DISABLE_MSC_WARNINGS_POP_() \
|
||||||
__pragma(warning(pop))
|
__pragma(warning(pop))
|
||||||
|
# if defined(__clang__)
|
||||||
|
# define GTEST_DISABLE_CLANG_DEPRECATED_WARNINGS_PUSH_() \
|
||||||
|
_Pragma("clang diagnostic push") \
|
||||||
|
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||||
|
# define GTEST_DISABLE_CLANG_WARNINGS_POP_() \
|
||||||
|
_Pragma("clang diagnostic pop")
|
||||||
|
# else
|
||||||
|
# define GTEST_DISABLE_CLANG_DEPRECATED_WARNINGS_PUSH_()
|
||||||
|
# define GTEST_DISABLE_CLANG_WARNINGS_POP_()
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
// Older versions of MSVC don't have __pragma.
|
// Older versions of MSVC don't have __pragma.
|
||||||
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
|
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
|
||||||
# define GTEST_DISABLE_MSC_WARNINGS_POP_()
|
# define GTEST_DISABLE_MSC_WARNINGS_POP_()
|
||||||
|
# define GTEST_DISABLE_CLANG_DEPRECATED_WARNINGS_PUSH_()
|
||||||
|
# define GTEST_DISABLE_CLANG_WARNINGS_POP_()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GTEST_LANG_CXX11
|
#ifndef GTEST_LANG_CXX11
|
||||||
|
@ -2352,6 +2364,7 @@ inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
|
||||||
// Functions deprecated by MSVC 8.0.
|
// Functions deprecated by MSVC 8.0.
|
||||||
|
|
||||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996 /* deprecated function */)
|
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996 /* deprecated function */)
|
||||||
|
GTEST_DISABLE_CLANG_DEPRECATED_WARNINGS_PUSH_()
|
||||||
|
|
||||||
inline const char* StrNCpy(char* dest, const char* src, size_t n) {
|
inline const char* StrNCpy(char* dest, const char* src, size_t n) {
|
||||||
return strncpy(dest, src, n);
|
return strncpy(dest, src, n);
|
||||||
|
@ -2399,6 +2412,7 @@ inline const char* GetEnv(const char* name) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GTEST_DISABLE_CLANG_WARNINGS_POP_()
|
||||||
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
||||||
|
|
||||||
#if GTEST_OS_WINDOWS_MOBILE
|
#if GTEST_OS_WINDOWS_MOBILE
|
||||||
|
|
|
@ -926,7 +926,7 @@ GTestLog::~GTestLog() {
|
||||||
// Disable Microsoft deprecation warnings for POSIX functions called from
|
// Disable Microsoft deprecation warnings for POSIX functions called from
|
||||||
// this class (creat, dup, dup2, and close)
|
// this class (creat, dup, dup2, and close)
|
||||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
|
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
|
||||||
|
GTEST_DISABLE_CLANG_DEPRECATED_WARNINGS_PUSH_()
|
||||||
#if GTEST_HAS_STREAM_REDIRECTION
|
#if GTEST_HAS_STREAM_REDIRECTION
|
||||||
|
|
||||||
// Object that captures an output stream (stdout/stderr).
|
// Object that captures an output stream (stdout/stderr).
|
||||||
|
@ -1010,6 +1010,7 @@ class CapturedStream {
|
||||||
};
|
};
|
||||||
|
|
||||||
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
GTEST_DISABLE_MSC_WARNINGS_POP_()
|
||||||
|
GTEST_DISABLE_CLANG_WARNINGS_POP_()
|
||||||
|
|
||||||
static CapturedStream* g_captured_stderr = NULL;
|
static CapturedStream* g_captured_stderr = NULL;
|
||||||
static CapturedStream* g_captured_stdout = NULL;
|
static CapturedStream* g_captured_stdout = NULL;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
RAPIDJSON_DIAG_PUSH
|
RAPIDJSON_DIAG_PUSH
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !(__clang__)
|
||||||
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
|
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
|
||||||
RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data
|
RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "rapidjson.h"
|
#include "rapidjson.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
RAPIDJSON_DIAG_PUSH
|
RAPIDJSON_DIAG_PUSH
|
||||||
RAPIDJSON_DIAG_OFF(4244) // conversion from 'type1' to 'type2', possible loss of data
|
RAPIDJSON_DIAG_OFF(4244) // conversion from 'type1' to 'type2', possible loss of data
|
||||||
RAPIDJSON_DIAG_OFF(4702) // unreachable code
|
RAPIDJSON_DIAG_OFF(4702) // unreachable code
|
||||||
|
@ -709,7 +709,7 @@ struct Transcoder<Encoding, Encoding> {
|
||||||
|
|
||||||
RAPIDJSON_NAMESPACE_END
|
RAPIDJSON_NAMESPACE_END
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
#if defined(__GNUC__) || (defined(_MSC_VER) && !defined(__clang__))
|
||||||
RAPIDJSON_DIAG_POP
|
RAPIDJSON_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
RAPIDJSON_DIAG_PUSH
|
RAPIDJSON_DIAG_PUSH
|
||||||
RAPIDJSON_DIAG_OFF(effc++)
|
RAPIDJSON_DIAG_OFF(effc++)
|
||||||
#endif
|
#endif
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
RAPIDJSON_DIAG_PUSH
|
RAPIDJSON_DIAG_PUSH
|
||||||
RAPIDJSON_DIAG_OFF(6334)
|
RAPIDJSON_DIAG_OFF(6334)
|
||||||
#endif
|
#endif
|
||||||
|
@ -174,7 +174,7 @@ template <typename T> struct RemoveSfinaeTag<SfinaeTag&(*)(T)> { typedef T Type;
|
||||||
RAPIDJSON_NAMESPACE_END
|
RAPIDJSON_NAMESPACE_END
|
||||||
//@endcond
|
//@endcond
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
#if defined(__GNUC__) || (defined(_MSC_VER) && !defined(__clang__))
|
||||||
RAPIDJSON_DIAG_POP
|
RAPIDJSON_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
RAPIDJSON_DIAG_PUSH
|
RAPIDJSON_DIAG_PUSH
|
||||||
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
|
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
|
||||||
RAPIDJSON_DIAG_OFF(4702) // unreachable code
|
RAPIDJSON_DIAG_OFF(4702) // unreachable code
|
||||||
|
@ -2214,7 +2214,7 @@ RAPIDJSON_DIAG_POP
|
||||||
RAPIDJSON_DIAG_POP
|
RAPIDJSON_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
RAPIDJSON_DIAG_POP
|
RAPIDJSON_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined (_MSC_VER) && !defined(__clang__)
|
||||||
RAPIDJSON_DIAG_PUSH
|
RAPIDJSON_DIAG_PUSH
|
||||||
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
|
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
|
||||||
#endif
|
#endif
|
||||||
|
@ -700,11 +700,11 @@ inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, siz
|
||||||
|
|
||||||
RAPIDJSON_NAMESPACE_END
|
RAPIDJSON_NAMESPACE_END
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
RAPIDJSON_DIAG_POP
|
RAPIDJSON_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __clang__
|
#if defined(__clang__)
|
||||||
RAPIDJSON_DIAG_POP
|
RAPIDJSON_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
# pragma warning(disable : 4131 4100)
|
# pragma warning(disable : 4131 4100)
|
||||||
|
# ifdef __clang__
|
||||||
|
# pragma clang diagnostic push
|
||||||
|
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
|
# endif
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
|
/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
|
||||||
|
@ -181,4 +185,7 @@ void fill_fopen_filefunc (pzlib_filefunc_def)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# pragma warning(pop)
|
# pragma warning(pop)
|
||||||
|
# ifdef __clang__
|
||||||
|
# pragma clang diagnostic pop
|
||||||
|
# endif
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#ifndef ZCALLBACK
|
#ifndef ZCALLBACK
|
||||||
|
|
||||||
#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
|
#if (defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
|
||||||
#define ZCALLBACK CALLBACK
|
#define ZCALLBACK CALLBACK
|
||||||
#else
|
#else
|
||||||
#define ZCALLBACK
|
#define ZCALLBACK
|
||||||
|
|
|
@ -1554,7 +1554,6 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
|
||||||
char *szComment;
|
char *szComment;
|
||||||
uLong uSizeBuf;
|
uLong uSizeBuf;
|
||||||
{
|
{
|
||||||
int err=UNZ_OK;
|
|
||||||
unz_s* s;
|
unz_s* s;
|
||||||
uLong uReadThis ;
|
uLong uReadThis ;
|
||||||
if (file==NULL)
|
if (file==NULL)
|
||||||
|
|
|
@ -5361,7 +5361,7 @@ mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip,
|
||||||
} else {
|
} else {
|
||||||
// Temporarily allocate a read buffer.
|
// Temporarily allocate a read buffer.
|
||||||
read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
|
read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
if (((0, sizeof(size_t) == sizeof(mz_uint32))) &&
|
if (((0, sizeof(size_t) == sizeof(mz_uint32))) &&
|
||||||
(read_buf_size > 0x7FFFFFFF))
|
(read_buf_size > 0x7FFFFFFF))
|
||||||
#else
|
#else
|
||||||
|
@ -5454,7 +5454,7 @@ void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index,
|
||||||
uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
|
uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
|
||||||
|
|
||||||
alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size;
|
alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size;
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
|
if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
|
||||||
#else
|
#else
|
||||||
if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
|
if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
|
||||||
|
@ -5560,7 +5560,7 @@ mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip,
|
||||||
if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) {
|
if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) {
|
||||||
// The file is stored or the caller has requested the compressed data.
|
// The file is stored or the caller has requested the compressed data.
|
||||||
if (pZip->m_pState->m_pMem) {
|
if (pZip->m_pState->m_pMem) {
|
||||||
#ifdef _MSC_VER
|
#if defined (_MSC_VER) && !defined(__clang__)
|
||||||
if (((0, sizeof(size_t) == sizeof(mz_uint32))) &&
|
if (((0, sizeof(size_t) == sizeof(mz_uint32))) &&
|
||||||
(file_stat.m_comp_size > 0xFFFFFFFF))
|
(file_stat.m_comp_size > 0xFFFFFFFF))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// reset packing to the original value
|
// reset packing to the original value
|
||||||
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
|
#if (defined(_MSC_VER) && !defined(__clang__)) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
|
||||||
# pragma pack( pop )
|
# pragma pack( pop )
|
||||||
#endif
|
#endif
|
||||||
#undef PACK_STRUCT
|
#undef PACK_STRUCT
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
# error poppack1.h must be included after pushpack1.h
|
# error poppack1.h must be included after pushpack1.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
|
#if (defined(_MSC_VER) && !defined(__clang__)) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
|
||||||
# pragma pack(push,1)
|
# pragma pack(push,1)
|
||||||
# define PACK_STRUCT
|
# define PACK_STRUCT
|
||||||
#elif defined( __GNUC__ ) || defined(__clang__)
|
#elif defined( __GNUC__ ) || defined(__clang__)
|
||||||
|
|
|
@ -44,21 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(_MSC_VER)
|
||||||
#define TMP_PATH "/tmp/"
|
|
||||||
inline FILE* MakeTmpFile(char* tmplate)
|
|
||||||
{
|
|
||||||
auto fd = mkstemp(tmplate);
|
|
||||||
EXPECT_NE(-1, fd);
|
|
||||||
if(fd == -1)
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
auto fs = fdopen(fd, "w+");
|
|
||||||
EXPECT_NE(nullptr, fs);
|
|
||||||
return fs;
|
|
||||||
}
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#define TMP_PATH "./"
|
#define TMP_PATH "./"
|
||||||
inline FILE* MakeTmpFile(char* tmplate)
|
inline FILE* MakeTmpFile(char* tmplate)
|
||||||
|
@ -73,4 +59,18 @@ inline FILE* MakeTmpFile(char* tmplate)
|
||||||
EXPECT_NE(fs, nullptr);
|
EXPECT_NE(fs, nullptr);
|
||||||
return fs;
|
return fs;
|
||||||
}
|
}
|
||||||
|
#elif defined(__GNUC__) || defined(__clang__)
|
||||||
|
#define TMP_PATH "/tmp/"
|
||||||
|
inline FILE* MakeTmpFile(char* tmplate)
|
||||||
|
{
|
||||||
|
auto fd = mkstemp(tmplate);
|
||||||
|
EXPECT_NE(-1, fd);
|
||||||
|
if(fd == -1)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
auto fs = fdopen(fd, "w+");
|
||||||
|
EXPECT_NE(nullptr, fs);
|
||||||
|
return fs;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -157,7 +157,6 @@ public:
|
||||||
|
|
||||||
static inline void CheckNodeIdNames(IdNameMap &nodeIdMap, IdNameMap &nodeNameMap, const aiNode *parent, size_t index) {
|
static inline void CheckNodeIdNames(IdNameMap &nodeIdMap, IdNameMap &nodeNameMap, const aiNode *parent, size_t index) {
|
||||||
IdNameString namePair = GetItemIdName(parent, index);
|
IdNameString namePair = GetItemIdName(parent, index);
|
||||||
const auto result = nodeNameMap.insert(namePair);
|
|
||||||
IdNameString idPair = GetColladaIdName(parent, index);
|
IdNameString idPair = GetColladaIdName(parent, index);
|
||||||
ReportDuplicate(nodeIdMap, idPair, typeid(aiNode).name());
|
ReportDuplicate(nodeIdMap, idPair, typeid(aiNode).name());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue