Skip to content

Commit

Permalink
Fix MacOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
egorodet committed Sep 20, 2024
1 parent 3dd6478 commit 09bed34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions Externals/Tracy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ if(NOT MSVC)
target_compile_options(TracyClient
PRIVATE
-Wno-unused-result # ignoring return value of 'fscanf' declared with attribute ‘warn_unused_result’
-Wno-deprecated-declarations # ignore warning: 'sprintf' is deprecated
)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ class AlignedAllocator
{
public:
using value_type = T;
using size_type = std::size_t ;
using size_type = std::size_t;
using difference_type = std::ptrdiff_t;

using pointer = T*;
using const_pointer = const T*;

using reference = T& ;
using const_reference = const T& ;
using reference = T&;
using const_reference = const T&;

template <typename T2>
struct rebind
Expand All @@ -68,10 +68,10 @@ class AlignedAllocator
#ifdef WIN32
return static_cast<pointer>(_aligned_malloc(allocate_size, N));
#else
void memory_ptr = nullptr;
if (posix_memalign&memory_ptr, N, allocate_size))
void* memory_ptr = nullptr;
if (posix_memalign(&memory_ptr, N, allocate_size))
throw std::bad_alloc();
return static_cast<pointer(memory_ptr);
return static_cast<pointer>(memory_ptr);
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Methane::Platform { class AppMac; }

@property (nonatomic, readonly, nullable) NSWindow* window;

- (id _Nullable) initWithApp : (Methane::Platform::AppMac* _Nonnull app_ptr andFrameRect : (NSRect) frame;
- (id _Nullable) initWithApp : (Methane::Platform::AppMac* _Nonnull) app_ptr andFrameRect : (NSRect) frame;
- (Methane::Platform::AppMac* _Nonnull) getApp;

@end

0 comments on commit 09bed34

Please sign in to comment.