From 24a63c87749fad49e08351dc54a0be8c376a6be3 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:12:40 +0000 Subject: [PATCH] Committing clang-format changes --- src/H5Tconv_complex.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/H5Tconv_complex.c b/src/H5Tconv_complex.c index 13afa902a3c..b8d4edef377 100644 --- a/src/H5Tconv_complex.c +++ b/src/H5Tconv_complex.c @@ -40,7 +40,8 @@ static herr_t H5T__conv_complex_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, void *buf); static herr_t H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8_t *d, - const H5T_conv_ctx_t *conv_ctx, uint8_t *src_rev, bool *exception_handled); + const H5T_conv_ctx_t *conv_ctx, uint8_t *src_rev, + bool *exception_handled); /*------------------------------------------------------------------------- * Function: H5T__conv_complex @@ -401,9 +402,10 @@ H5T__conv_complex_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ct else { bool exception_handled = false; - if (H5T__conv_complex_part(src_p, dst_p, s + src_part_size, d + dst_part_size, - conv_ctx, src_rev, &exception_handled) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't convert imaginary part of complex number"); + if (H5T__conv_complex_part(src_p, dst_p, s + src_part_size, d + dst_part_size, conv_ctx, src_rev, + &exception_handled) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, + "can't convert imaginary part of complex number"); /* If an exception was handled, go to the next element */ if (exception_handled) { @@ -626,8 +628,8 @@ H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8 H5T__reverse_order(src_rev, s, src_p); except_ret = (conv_ctx->u.conv.cb_struct.func)( - H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, conv_ctx->u.conv.dst_type_id, - src_rev, d, conv_ctx->u.conv.cb_struct.user_data); + H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, conv_ctx->u.conv.dst_type_id, src_rev, + d, conv_ctx->u.conv.cb_struct.user_data); } if (except_ret == H5T_CONV_UNHANDLED) { @@ -659,7 +661,9 @@ H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8 if (H5T__bit_get_d(s, (mpos + (size_t)mant_msb) - 1, (size_t)1) && !denormalized) { /* Don't do rounding if exponent is 111...110 and mantissa is 111...11. * To do rounding and increment exponent in this case will create an infinity value. */ - if ((H5T__bit_find(s, mpos + (size_t)mant_msb, msize - (size_t)mant_msb, H5T_BIT_LSB, false) >= 0 || expo < expo_max - 1)) { + if ((H5T__bit_find(s, mpos + (size_t)mant_msb, msize - (size_t)mant_msb, H5T_BIT_LSB, false) >= + 0 || + expo < expo_max - 1)) { carry = H5T__bit_inc(s, mpos + (size_t)mant_msb - 1, 1 + msize - (size_t)mant_msb); if (carry) implied = 2; @@ -716,8 +720,8 @@ H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8 H5T__reverse_order(src_rev, s, src_p); except_ret = (conv_ctx->u.conv.cb_struct.func)( - H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, - conv_ctx->u.conv.dst_type_id, src_rev, d, conv_ctx->u.conv.cb_struct.user_data); + H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, conv_ctx->u.conv.dst_type_id, + src_rev, d, conv_ctx->u.conv.cb_struct.user_data); } if (except_ret == H5T_CONV_UNHANDLED) {