Updated assimp to latest

This commit is contained in:
Areloch 2019-03-05 14:39:38 -06:00
parent 25ce4477ce
commit 161bf7f83b
461 changed files with 34662 additions and 30165 deletions

View file

@ -30,7 +30,7 @@ THE SOFTWARE.
/* Thank you, Microsoft, for file WinDef.h with min/max redefinition. */
#define NOMINMAX
#include <windows.h>
#elif __MACH__
#elif __APPLE__
#include <mach/clock.h>
#include <mach/mach.h>
#else
@ -73,7 +73,7 @@ namespace o3dgc
LARGE_INTEGER m_freq;
};
#elif __MACH__
#elif __APPLE__
class Timer
{
public:

View file

@ -371,6 +371,9 @@ inline bool PointsEqual( const IntPoint &pt1, const IntPoint &pt2)
bool Orientation(OutRec *outRec, bool UseFullInt64Range)
{
if (!outRec->pts)
return 0.0;
//first make sure bottomPt is correctly assigned ...
OutPt *opBottom = outRec->pts, *op = outRec->pts->next;
while (op != outRec->pts)
@ -434,6 +437,9 @@ double Area(const Polygon &poly)
double Area(const OutRec &outRec, bool UseFullInt64Range)
{
if (!outRec.pts)
return 0.0;
OutPt *op = outRec.pts;
if (UseFullInt64Range) {
Int128 a(0);
@ -3085,9 +3091,9 @@ void Clipper::JoinCommonEdges(bool fixHoleLinkages)
FixupOutPolygon(*outRec1);
FixupOutPolygon(*outRec2);
if (Orientation(outRec1, m_UseFullRange) != (Area(*outRec1, m_UseFullRange) > 0))
if (outRec1->pts && (Orientation(outRec1, m_UseFullRange) != (Area(*outRec1, m_UseFullRange) > 0)))
DisposeBottomPt(*outRec1);
if (Orientation(outRec2, m_UseFullRange) != (Area(*outRec2, m_UseFullRange) > 0))
if (outRec2->pts && (Orientation(outRec2, m_UseFullRange) != (Area(*outRec2, m_UseFullRange) > 0)))
DisposeBottomPt(*outRec2);
} else

View file

@ -9,6 +9,8 @@
#include "irrString.h"
#include "irrArray.h"
#include <cassert>
using namespace Assimp;
#ifdef _DEBUG
@ -664,12 +666,9 @@ private:
TextData = new char_type[sizeWithoutHeader];
// MSVC debugger complains here about loss of data ...
// FIXME - gcc complains about 'shift width larger than width of type'
// for T == unsigned long. Avoid it by messing around volatile ..
volatile unsigned int c = 3;
const src_char_type cc = (src_char_type)((((uint64_t)1u << (sizeof( char_type)<<c)) - 1));
size_t numShift = sizeof( char_type) * 8;
assert(numShift < 64);
const src_char_type cc = (src_char_type)(((uint64_t(1u) << numShift) - 1));
for (int i=0; i<sizeWithoutHeader; ++i)
TextData[i] = char_type( source[i] & cc);

View file

@ -21,8 +21,7 @@ class array
{
public:
array()
array()
: data(0), allocated(0), used(0),
free_when_destroyed(true), is_sorted(true)
{

View file

@ -9,7 +9,7 @@
#include "irrXML.h"
#include "irrString.h"
#include "irrArray.h"
#include "./../../code/fast_atof.h"
#include <assimp/fast_atof.h>
#include "CXMLReaderImpl.h"
namespace irr

View file

@ -100,9 +100,15 @@ static bool isUnsignedIntegerType( Value::ValueType integerType ) {
}
static DDLNode *createDDLNode( Text *id, OpenDDLParser *parser ) {
// Basic checks
if( ddl_nullptr == id || ddl_nullptr == parser ) {
return ddl_nullptr;
}
// If the buffer is empty ( an empty node ) return nullptr
if ( ddl_nullptr == id->m_buffer ) {
return ddl_nullptr;
}
const std::string type( id->m_buffer );
DDLNode *parent( parser->top() );

View file

@ -59,32 +59,10 @@ bool isSeparator( T in ) {
return false;
}
static const unsigned char chartype_table[ 256 ] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-15
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 32-47
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, // 48-63
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 64-79
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80-95
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 96-111
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 112-127
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // > 127
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
template<class T>
inline
bool isNumeric( const T in ) {
return ( chartype_table[ static_cast<size_t>( in ) ] == 1 );
return ( in >= '0' && in <= '9' );
}
template<class T>

File diff suppressed because it is too large Load diff

View file

@ -41,6 +41,10 @@ woven in by Terry Thorsen 1/2003.
#include "zlib.h"
#include "unzip.h"
#if ZLIB_VERNUM < 0x1270
typedef unsigned long z_crc_t;
#endif
#ifdef STDC
# include <stddef.h>
# include <string.h>

View file

@ -4427,7 +4427,7 @@ mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name,
mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
MZ_FILE *pSrc_file = NULL;
if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION))
if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || ( level_and_flags > MZ_UBER_COMPRESSION))
return MZ_FALSE;
local_dir_header_ofs = cur_archive_file_ofs = pZip->m_archive_size;