Skip to content

Commit

Permalink
Fix build with clang 12
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongseok-meta authored and nem0 committed Jun 22, 2024
1 parent 932dbba commit 183010c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ofbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <inttypes.h>
#include <string.h>

#if __cplusplus >= 202002L
#if __cplusplus >= 202002L && defined(__cpp_lib_bit_cast)
#include <bit> // for std::bit_cast (C++20 and later)
#endif
#include <map>
Expand Down Expand Up @@ -1051,7 +1051,7 @@ static OptionalError<Element*> tokenize(const u8* data, size_t size, u32& versio
cursor.current = data;
cursor.end = data + size;

#if __cplusplus >= 202002L
#if __cplusplus >= 202002L && defined(__cpp_lib_bit_cast)
const Header* header = std::bit_cast<const Header*>(cursor.current);
#else
Header header_temp;
Expand Down

0 comments on commit 183010c

Please sign in to comment.