[APFloat] multiplySignificand - pass IEEEFloat as const reference. NFCI.

Avoids unnecessary IEEEFloat copies.
This commit is contained in:
Simon Pilgrim 2021-02-01 15:41:03 +00:00
parent c448ea948c
commit ce587529ad
2 changed files with 3 additions and 3 deletions

View File

@ -492,8 +492,8 @@ private:
integerPart addSignificand(const IEEEFloat &);
integerPart subtractSignificand(const IEEEFloat &, integerPart);
lostFraction addOrSubtractSignificand(const IEEEFloat &, bool subtract);
lostFraction multiplySignificand(const IEEEFloat &, IEEEFloat);
lostFraction multiplySignificand(const IEEEFloat&);
lostFraction multiplySignificand(const IEEEFloat &, const IEEEFloat &);
lostFraction multiplySignificand(const IEEEFloat &);
lostFraction divideSignificand(const IEEEFloat &);
void incrementSignificand();
void initialize(const fltSemantics *);

View File

@ -1007,7 +1007,7 @@ IEEEFloat::integerPart IEEEFloat::subtractSignificand(const IEEEFloat &rhs,
on to the full-precision result of the multiplication. Returns the
lost fraction. */
lostFraction IEEEFloat::multiplySignificand(const IEEEFloat &rhs,
IEEEFloat addend) {
const IEEEFloat &addend) {
unsigned int omsb; // One, not zero, based MSB.
unsigned int partsCount, newPartsCount, precision;
integerPart *lhsSignificand;