diff options
author | lloyd <[email protected]> | 2012-05-18 14:24:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-05-18 14:24:51 +0000 |
commit | ab5c922f0e2635dc0e45fc757b27be9f28986acb (patch) | |
tree | c21a18bbfb316196b1b13488ef05f184f12be9f0 /src/math/bigint/bigint.cpp | |
parent | 2c3dc93d6466a9215d585613fb55f5222ce70d10 (diff) |
Remove all uses of MemoryRegion::copy outside of internal uses in
secmem.h. Mostly replaced by assign or copy_mem.
Diffstat (limited to 'src/math/bigint/bigint.cpp')
-rw-r--r-- | src/math/bigint/bigint.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp index e2bbe7f5a..df4414aba 100644 --- a/src/math/bigint/bigint.cpp +++ b/src/math/bigint/bigint.cpp @@ -44,19 +44,8 @@ BigInt::BigInt(Sign s, size_t size) */ BigInt::BigInt(const BigInt& b) { - const size_t b_words = b.sig_words(); - - if(b_words) - { - reg.resize(round_up<size_t>(b_words, 8)); - reg.copy(b.data(), b_words); - set_sign(b.sign()); - } - else - { - reg.resize(2); - set_sign(Positive); - } + reg = b.get_reg(); + set_sign(b.sign()); } /* |