File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ namespace SR_MATH_NS {
2727 SR_NODISCARD bool IsValid () const noexcept ;
2828 SR_NODISCARD bool IsEmpty () const noexcept ;
2929 SR_NODISCARD FVector3 GetCenter () const noexcept ;
30+ SR_NODISCARD FVector3 GetPosition () const noexcept ;
3031 SR_NODISCARD FVector3 GetSize () const noexcept ;
3132 SR_NODISCARD FVector3 GetExtends () const noexcept ;
3233
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ namespace SR_MATH_NS {
3636 return max - min;
3737 }
3838
39+ FVector3 AABB::GetPosition () const noexcept {
40+ return min;
41+ }
42+
3943 AABB AABB::UnitCube (const float_t size) noexcept {
4044 return AABB (FVector3 (-size), FVector3 (size));
4145 }
Original file line number Diff line number Diff line change @@ -10,11 +10,18 @@ void* SRMalloc(SR_UTILS_NS::SizeType size) {
1010 if (g_TracyAllocatorInitialized) {
1111 SR_TRACY_ZONE;
1212 SR_TRACY_ZONE_COLOR (0xFF00FF00 );
13- void * pMemory = std::malloc (size);
14- SR_TRACY_ALLOC (pMemory, size);
15- return pMemory;
13+ void * pAllocation = std::malloc (size);
14+ if (!pAllocation) {
15+ SRHalt (" SRMalloc() : failed to allocate memory! Size: {}Mb" , size / (1024 * 1024 ));
16+ }
17+ SR_TRACY_ALLOC (pAllocation, size);
18+ return pAllocation;
1619 }
17- return std::malloc (size);
20+ void * pAllocation = std::malloc (size);
21+ if (!pAllocation) {
22+ SRHalt (" SRMalloc() : failed to allocate memory! Size: {}Mb" , size / (1024 * 1024 ));
23+ }
24+ return pAllocation;
1825}
1926
2027void * SRReAlloc (void * pMemory, SR_UTILS_NS::SizeType size) {
You can’t perform that action at this time.
0 commit comments