[Pkg-javascript-commits] [node-hash-base] 01/03: Change Math.floor to |0

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:21:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to annotated tag v2.0.1
in repository node-hash-base.

commit 24f7bb573e4b9d2d3a8851fa72ed446a5df05960
Author: Kirill Fomichev <fanatid at ya.ru>
Date:   Thu Apr 14 16:00:36 2016 +0300

    Change Math.floor to |0
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 5b73f6a..dbb8360 100644
--- a/index.js
+++ b/index.js
@@ -34,7 +34,7 @@ HashBase.prototype.update = function (data, encoding) {
   // update length
   for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
     this._length[j] += carry
-    carry = Math.floor(this._length[j] / 0x0100000000)
+    carry = (this._length[j] / 0x0100000000) | 0
     if (carry > 0) this._length[j] -= 0x0100000000 * carry
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-hash-base.git



More information about the Pkg-javascript-commits mailing list