Skip to content

Commit

Permalink
Merge pull request #404 from blackball/master
Browse files Browse the repository at this point in the history
Implement = operator for BigInteger
  • Loading branch information
miloyip committed Aug 7, 2015
2 parents c583119 + c085447 commit 8498c78
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/rapidjson/internal/biginteger.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ class BigInteger {
if (length > 0)
AppendDecimal64(decimals + i, decimals + i + length);
}


BigInteger& operator=(const BigInteger &rhs)
{
count_ = rhs.count_;
std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type));
return *this;
}

BigInteger& operator=(uint64_t u) {
digits_[0] = u;
count_ = 1;
Expand Down

0 comments on commit 8498c78

Please sign in to comment.