Răsfoiți Sursa

Added comments

Jorrit Rouwe 2 zile în urmă
părinte
comite
1262f85596
2 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 1 0
      Docs/ReleaseNotes.md
  2. 1 0
      Jolt/Core/Memory.h

+ 1 - 0
Docs/ReleaseNotes.md

@@ -10,6 +10,7 @@ For breaking API changes see [this document](https://github.com/jrouwe/JoltPhysi
 * Added `RagdollSettings::CalculateConstraintPriorities` which calculates constraint priorities that boost the priority of joints towards the root of the ragdoll.
 * BoxShape, CylinderShape and TaperedCylinderShape will now automatically reduce the convex radius if the specified value is too big for the shape (instead of erroring out).
 * Added ability to configure the thickness of triangles when colliding with soft bodies through `CollideSoftBodyVerticesVsTriangles::sTriangleThickness`.
+* Added `JPH_DEFAULT_ALLOCATE_ALIGNMENT` which allows defining the default `Allocate` alignment if your allocator's alignment is different from the alignment as defined by `__STDCPP_DEFAULT_NEW_ALIGNMENT__`.
 
 ### Bug Fixes
 

+ 1 - 0
Jolt/Core/Memory.h

@@ -9,6 +9,7 @@ JPH_NAMESPACE_BEGIN
 #ifndef JPH_DISABLE_CUSTOM_ALLOCATOR
 
 /// Normal memory allocation, must be at least 8 byte aligned on 32 bit platform and 16 byte aligned on 64 bit platform.
+/// Note that you can override JPH_DEFAULT_ALLOCATE_ALIGNMENT if your allocator's alignment is different from the alignment as defined by `__STDCPP_DEFAULT_NEW_ALIGNMENT__`.
 using AllocateFunction = void *(*)(size_t inSize);
 
 /// Reallocate memory. inBlock can be nullptr in which case it must behave as a memory allocation.