Skip to content

Commit cf727a8

Browse files
committed
more amalgamation in the nation
1 parent d829bf7 commit cf727a8

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

ffc.h

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -322,17 +322,13 @@ bool ffc_int_kind_is_signed(ffc_int_kind ik) {
322322

323323
ffc_internal ffc_inline
324324
ffc_value_bits ffc_get_value_bits(ffc_value value, ffc_value_kind vk) {
325+
ffc_value_bits bits;
325326
if (vk == FFC_VALUE_KIND_DOUBLE) {
326-
#if _MSC_VER && !defined(__clang__)
327-
ffc_value_bits bits;
328327
bits.di = ffc_get_double_bits(value.d);
329-
return bits;
330-
#else
331-
return (ffc_value_bits){.di=ffc_get_double_bits(value.d)};
332-
#endif
333328
} else {
334-
return (ffc_value_bits){.fi=ffc_get_float_bits(value.f)};
329+
bits.fi = ffc_get_float_bits(value.f);
335330
}
331+
return bits;
336332
}
337333

338334
ffc_internal ffc_inline
@@ -1422,14 +1418,10 @@ ffc_result ffc_parse_int_string(
14221418
}
14231419

14241420
if (p == pend || base < 2 || base > 36) {
1425-
#if _MSC_VER && !defined(__clang__)
14261421
ffc_result invalid_input_result;
14271422
invalid_input_result.ptr = (char*)p;
14281423
invalid_input_result.outcome = FFC_OUTCOME_INVALID_INPUT;
14291424
return invalid_input_result;
1430-
#else
1431-
return (ffc_result){ .ptr = (char*)p, .outcome = FFC_OUTCOME_INVALID_INPUT };
1432-
#endif
14331425
}
14341426

14351427
ffc_result answer;
@@ -1474,11 +1466,7 @@ ffc_result ffc_parse_int_string(
14741466

14751467
if (digit_count == 0) {
14761468
if (has_leading_zeros) {
1477-
#if _MSC_VER && !defined(__clang__)
1478-
value->u64 = 0;
1479-
#else
1480-
*value = (ffc_int_value){0}; // Largest variants are defined first so this will clear the entire union
1481-
#endif
1469+
value->u64 = 0; // Must zero the largest variant!
14821470
answer.outcome = FFC_OUTCOME_OK;
14831471
answer.ptr = p;
14841472
} else {
@@ -2179,13 +2167,11 @@ ffc_internal ffc_inline
21792167
bool ffc_bigint_pow5(ffc_bigint* me, uint32_t exp) {
21802168
// multiply by a power of 5
21812169
size_t large_length = sizeof(ffc_large_power_of_5) / sizeof(ffc_bigint_limb);
2182-
#if _MSC_VER && !defined(__clang__)
2170+
21832171
ffc_bigint_limb_span large;
21842172
large.ptr = (ffc_bigint_limb*)ffc_large_power_of_5;
21852173
large.len = large_length;
2186-
#else
2187-
ffc_bigint_limb_span large = (ffc_bigint_limb_span){ .ptr = (ffc_bigint_limb*)ffc_large_power_of_5, .len = large_length};
2188-
#endif
2174+
21892175
while (exp >= pow5_tables_large_step) {
21902176
FFC_TRY(ffc_bigint_large_mul(&me->vec, large));
21912177
exp -= pow5_tables_large_step;

0 commit comments

Comments
 (0)