Fixed warnings in Bullet/src core library

Thanks Martijn Reuvers from Two Tribes B.V. (www.twotribes.com) for the patch

To make this work more visible, suppress warnings in external libraries in Extras (COLLADA_DOM, libxml and glui contain many warnings)
Added PreprocessorDefinitions: _CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE to vcproj files
This commit is contained in:
erwin.coumans
2008-05-10 18:00:21 +00:00
parent 739d09a7af
commit bd97c5e569
285 changed files with 11554 additions and 11205 deletions

View File

@@ -120,35 +120,41 @@ void btAlignedFreeInternal (void* ptr)
#else
void* btAlignedAllocInternal (size_t size, int alignment)
{
void *ret;
char *real;
unsigned long offset;
gNumAlignedAllocs++;
void* btAlignedAllocInternal (std::size_t size, int alignment);
real = (char *)malloc(size + sizeof(void *) + (alignment-1));
if (real) {
offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1);
ret = (void *)((real + sizeof(void *)) + offset);
*((void **)(ret)-1) = (void *)(real);
} else {
ret = (void *)(real);
}
return (ret);
void* btAlignedAllocInternal (std::size_t size, int alignment)
{
void *ret;
char *real;
unsigned long offset;
gNumAlignedAllocs++;
real = (char*) malloc(size + sizeof(void *) + (alignment-1));
if (real != 0)
{
offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1);
ret = (void *)((real + sizeof(void *)) + offset);
*((void **)(ret)-1) = (void *)(real);
}
else
{
ret = (void *)(real);
}
return (ret);
}
void btAlignedFreeInternal (void* ptr)
{
void* real;
gNumAlignedFree++;
void* real;
gNumAlignedFree++;
if (ptr) {
real = *((void **)(ptr)-1);
free(real);
}
if (ptr != 0)
{
real = *((void **)(ptr)-1);
//::operator delete(real);
free(real);
}
}
#endif //