Skip to content

Commit

Permalink
Merge pull request #31 from stevenroose/small-patch-1
Browse files Browse the repository at this point in the history
Used Uint8List instead of List<int> for performance improvement.
  • Loading branch information
adam-singer committed Sep 3, 2014
2 parents 5e1ef43 + 6b3c4e1 commit f01ec52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/bignum.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
library bignum;

import 'dart:math' as Mathx;
import 'dart:typed_data';
part 'src/BigInteger_v8/big_integer.dart';
2 changes: 1 addition & 1 deletion lib/src/BigInteger_v8/big_integer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class BigInteger {
// Add a leading 0 if most significant bit set (otherwise, the magnitude
// is interpreted as negative and this constructor fails)
if( (magnitude[0] & 0x80) != 0 ) {
magnitude = new List<int>(1+magnitude.length)
magnitude = new Uint8List(1+magnitude.length)
..[0] = 0
..setRange(1, 1+magnitude.length, magnitude);
}
Expand Down

0 comments on commit f01ec52

Please sign in to comment.