irrXML: Remove horrible hack
parent
4078543827
commit
0cc25491a4
|
@ -9,6 +9,8 @@
|
||||||
#include "irrString.h"
|
#include "irrString.h"
|
||||||
#include "irrArray.h"
|
#include "irrArray.h"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
@ -664,12 +666,9 @@ private:
|
||||||
TextData = new char_type[sizeWithoutHeader];
|
TextData = new char_type[sizeWithoutHeader];
|
||||||
|
|
||||||
// MSVC debugger complains here about loss of data ...
|
// MSVC debugger complains here about loss of data ...
|
||||||
|
size_t numShift = sizeof( char_type) * 8;
|
||||||
|
assert(numShift < 64);
|
||||||
// FIXME - gcc complains about 'shift width larger than width of type'
|
const src_char_type cc = (src_char_type)(((uint64_t(1u) << numShift) - 1));
|
||||||
// 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));
|
|
||||||
for (int i=0; i<sizeWithoutHeader; ++i)
|
for (int i=0; i<sizeWithoutHeader; ++i)
|
||||||
TextData[i] = char_type( source[i] & cc);
|
TextData[i] = char_type( source[i] & cc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue