@@ -57,8 +57,8 @@ inline std::pair<DigitsT, int16_t> getRounded(DigitsT Digits, int16_t Scale,
5757 if (ShouldRound)
5858 if (!++Digits)
5959 // Overflow.
60- return std::make_pair ( DigitsT (1 ) << (getWidth<DigitsT>() - 1 ), Scale + 1 ) ;
61- return std::make_pair ( Digits, Scale) ;
60+ return { DigitsT (1 ) << (getWidth<DigitsT>() - 1 ), Scale + 1 } ;
61+ return { Digits, Scale} ;
6262}
6363
6464// / Convenience helper for 32-bit rounding.
@@ -83,7 +83,7 @@ inline std::pair<DigitsT, int16_t> getAdjusted(uint64_t Digits,
8383
8484 const int Width = getWidth<DigitsT>();
8585 if (Width == 64 || Digits <= std::numeric_limits<DigitsT>::max ())
86- return std::make_pair ( Digits, Scale) ;
86+ return { Digits, Scale} ;
8787
8888 // Shift right and round.
8989 int Shift = llvm::bit_width (Digits) - Width;
@@ -160,9 +160,9 @@ std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) {
160160
161161 // Check for zero.
162162 if (!Dividend)
163- return std::make_pair ( 0 , 0 ) ;
163+ return { 0 , 0 } ;
164164 if (!Divisor)
165- return std::make_pair (std:: numeric_limits<DigitsT>::max (), MaxScale) ;
165+ return { std::numeric_limits<DigitsT>::max (), MaxScale} ;
166166
167167 if (getWidth<DigitsT>() == 64 )
168168 return divide64 (Dividend, Divisor);
@@ -192,7 +192,7 @@ inline std::pair<int32_t, int> getLgImpl(DigitsT Digits, int16_t Scale) {
192192 static_assert (!std::numeric_limits<DigitsT>::is_signed, " expected unsigned" );
193193
194194 if (!Digits)
195- return std::make_pair ( INT32_MIN, 0 ) ;
195+ return { INT32_MIN, 0 } ;
196196
197197 // Get the floor of the lg of Digits.
198198 static_assert (sizeof (Digits) <= sizeof (uint64_t ));
@@ -201,12 +201,12 @@ inline std::pair<int32_t, int> getLgImpl(DigitsT Digits, int16_t Scale) {
201201 // Get the actual floor.
202202 int32_t Floor = Scale + LocalFloor;
203203 if (Digits == UINT64_C (1 ) << LocalFloor)
204- return std::make_pair ( Floor, 0 ) ;
204+ return { Floor, 0 } ;
205205
206206 // Round based on the next digit.
207207 assert (LocalFloor >= 1 );
208208 bool Round = Digits & UINT64_C (1 ) << (LocalFloor - 1 );
209- return std::make_pair ( Floor + Round, Round ? 1 : -1 ) ;
209+ return { Floor + Round, Round ? 1 : -1 } ;
210210}
211211
212212// / Get the lg (rounded) of a scaled number.
@@ -348,11 +348,11 @@ std::pair<DigitsT, int16_t> getSum(DigitsT LDigits, int16_t LScale,
348348 // Compute sum.
349349 DigitsT Sum = LDigits + RDigits;
350350 if (Sum >= RDigits)
351- return std::make_pair ( Sum, Scale) ;
351+ return { Sum, Scale} ;
352352
353353 // Adjust sum after arithmetic overflow.
354354 DigitsT HighBit = DigitsT (1 ) << (getWidth<DigitsT>() - 1 );
355- return std::make_pair ( HighBit | Sum >> 1 , Scale + 1 ) ;
355+ return { HighBit | Sum >> 1 , Scale + 1 } ;
356356}
357357
358358// / Convenience helper for 32-bit sum.
@@ -384,18 +384,18 @@ std::pair<DigitsT, int16_t> getDifference(DigitsT LDigits, int16_t LScale,
384384
385385 // Compute difference.
386386 if (LDigits <= RDigits)
387- return std::make_pair ( 0 , 0 ) ;
387+ return { 0 , 0 } ;
388388 if (RDigits || !SavedRDigits)
389- return std::make_pair ( LDigits - RDigits, LScale) ;
389+ return { LDigits - RDigits, LScale} ;
390390
391391 // Check if RDigits just barely lost its last bit. E.g., for 32-bit:
392392 //
393393 // 1*2^32 - 1*2^0 == 0xffffffff != 1*2^32
394394 const auto RLgFloor = getLgFloor (SavedRDigits, SavedRScale);
395395 if (!compare (LDigits, LScale, DigitsT (1 ), RLgFloor + getWidth<DigitsT>()))
396- return std::make_pair (std:: numeric_limits<DigitsT>::max (), RLgFloor) ;
396+ return { std::numeric_limits<DigitsT>::max (), RLgFloor} ;
397397
398- return std::make_pair ( LDigits, LScale) ;
398+ return { LDigits, LScale} ;
399399}
400400
401401// / Convenience helper for 32-bit difference.
@@ -435,9 +435,9 @@ class ScaledNumberBase {
435435
436436 static std::pair<uint64_t , bool > splitSigned (int64_t N) {
437437 if (N >= 0 )
438- return std::make_pair ( N, false ) ;
438+ return { N, false } ;
439439 uint64_t Unsigned = N == INT64_MIN ? UINT64_C (1 ) << 63 : uint64_t (-N);
440- return std::make_pair ( Unsigned, true ) ;
440+ return { Unsigned, true } ;
441441 }
442442 static int64_t joinSigned (uint64_t U, bool IsNeg) {
443443 if (U > uint64_t (INT64_MAX))
0 commit comments