| 1707 | } |
| 1708 | |
| 1709 | Integer operator+(const Integer &a, const Integer& b) |
| 1710 | { |
| 1711 | Integer sum((word)0, STDMAX(a.reg.size, b.reg.size)); |
| 1712 | if (a.NotNegative()) |
| 1713 | { |
| 1714 | if (b.NotNegative()) |
| 1715 | PositiveAdd(sum, a, b); |
| 1716 | else |
| 1717 | PositiveSubtract(sum, a, b); |
| 1718 | } |
| 1719 | else |
| 1720 | { |
| 1721 | if (b.NotNegative()) |
| 1722 | PositiveSubtract(sum, b, a); |
| 1723 | else |
| 1724 | { |
| 1725 | PositiveAdd(sum, a, b); |
| 1726 | sum.sign = Integer::NEGATIVE; |
| 1727 | } |
| 1728 | } |
| 1729 | return sum; |
| 1730 | } |
| 1731 | |
| 1732 | Integer& Integer::operator+=(const Integer& t) |
| 1733 | { |
nothing calls this directly
no test coverage detected