浏览代码

Reversing commit d586b8c

Samuel Jaffe 8 年之前
父节点
当前提交
a61d5838af
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 1 1
      include/bignum_helper.h
  2. 1 2
      src/bignum_helper.cpp

+ 1 - 1
include/bignum_helper.h

@@ -16,7 +16,7 @@ namespace math { namespace detail {
   int compare(data_type const & rhs, data_type const & lhs, size_t offset = 0);
   void add(data_type & rhs, data_type const & lhs, size_t offset = 0);
   void subtract_nounderflow(data_type & rhs, data_type const & lhs, size_t offset = 0);
-  void multiply(data_type & rhs, data_type const & lhs, size_t offset = 0);
+  void multiply(data_type & rhs, data_type const & lhs);
   data_type divide(data_type & remainder, data_type const & divisor);
   data_type shift10(data_type const & data, int32_t places);
 } }

+ 1 - 2
src/bignum_helper.cpp

@@ -72,7 +72,7 @@ namespace math { namespace detail {
     if (rhs[rbnd-1] == 0 && rbnd > 1) { rhs.pop_back(); }
   }
   
-  void multiply(data_type & rhs, data_type const & lhs, size_t offset) {
+  void multiply(data_type & rhs, data_type const & lhs) {
     size_t const rbnd = rhs.size(), lbnd = lhs.size();
     size_t const ubnd = rbnd + lbnd;
     rhs.resize(ubnd);
@@ -99,7 +99,6 @@ namespace math { namespace detail {
       }
     }
     while (rhs.back() == 0) { rhs.pop_back(); }
-    rhs.erase(rhs.begin(), rhs.begin() + ptrdiff_t(offset));
   }
     
   data_type shift10(data_type const & data, int32_t places) {