Skip to content

Commit

Permalink
Check if the macro H5PP_USE_FLOAT128 is defined instead of == 1 or 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAce committed May 13, 2023
1 parent 412e043 commit e930258
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/h5pp/details/h5ppTypeCustom.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

#if !defined(H5PP_USE_FLOAT128)
#if defined(__GNUC__) || defined(__clang__)
#define H5PP_USE_FLOAT128 1
#else
#define H5PP_USE_FLOAT128 0
#define H5PP_USE_FLOAT128
#endif
#endif

Expand All @@ -24,7 +22,7 @@ namespace h5pp::type::custom {
inline static hid::h5t float_id;
static void init() {
if(not float_id.valid()) {
#if H5PP_USE_FLOAT128 == 1
#if defined(H5PP_USE_FLOAT128)
if constexpr(std::is_same_v<T, __float128>) {
#if __BYTE_ORDER == LITTLE_ENDIAN
float_id = H5Tcopy(H5T_IEEE_F64LE);
Expand Down

0 comments on commit e930258

Please sign in to comment.