Add missing headerh will be needed on Ubuntu

- closes https://github.com/assimp/assimp/issues/4720
pull/4800/head
Kim Kulling 2022-11-18 11:39:51 +01:00 committed by GitHub
parent 97d7f685ba
commit 3c51eafaf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -47,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <cmath> #include <cmath>
@ -64,11 +65,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#undef get16bits #undef get16bits
#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
|| defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
#define get16bits(d) (*((const uint16_t *) (d))) # define get16bits(d) (*((const uint16_t *) (d)))
#endif #endif
#if !defined (get16bits) #if !defined (get16bits)
#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\ # define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
+(uint32_t)(((const uint8_t *)(d))[0]) ) +(uint32_t)(((const uint8_t *)(d))[0]) )
#endif #endif
@ -77,8 +78,8 @@ inline uint32_t SuperFastHash (const char * data, uint32_t len = 0, uint32_t has
uint32_t tmp; uint32_t tmp;
int rem; int rem;
if (!data) return 0; if (data == NULL) return 0;
if (!len)len = (uint32_t)::strlen(data); if (len == 0)len = (uint32_t)::strlen(data);
rem = len & 3; rem = len & 3;
len >>= 2; len >>= 2;