fix compilation on BigEndian
cannot pass a function by reference where an lvalue is expected (only applies to bigendian, where a macro expands to a byteswap function) Closes https://github.com/assimp/assimp/issues/613pull/689/head
parent
e6ac1ed66a
commit
756cfd4f74
|
@ -84,7 +84,12 @@ namespace Assimp {
|
|||
|
||||
template<typename T>
|
||||
inline std::size_t Copy(uint8_t* data, T& field) {
|
||||
#ifdef AI_BUILD_BIG_ENDIAN
|
||||
T field_swapped=AI_BE(field);
|
||||
std::memcpy(data, &field_swapped, sizeof(field)); return sizeof(field);
|
||||
#else
|
||||
std::memcpy(data, &AI_BE(field), sizeof(field)); return sizeof(field);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Bitmap::WriteHeader(Header& header, IOStream* file) {
|
||||
|
|
Loading…
Reference in New Issue