irrXML: Remove horrible hack

pull/1656/head
Turo Lamminen 2017-12-24 15:25:42 +02:00
parent 4078543827
commit 0cc25491a4
1 changed files with 5 additions and 6 deletions

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);