Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Remove redundant docs
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Oct 18, 2023
1 parent 641a686 commit 8be51ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
9 changes: 9 additions & 0 deletions lib/src/int64.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,13 @@ abstract class Int64 implements IntX {

@override
Int64 toSigned(int width);

/// Returns whether this [Int64] has the same numeric value as the given
/// object. The argument may be an [int] or an [IntX].
@override
bool operator ==(Object other);

/// Returns a hash code based on the numeric value.
@override
int get hashCode;
}
10 changes: 0 additions & 10 deletions lib/src/int64_emulated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class Int64Impl implements Int64 {
return Int64Impl._masked(d0, d1, d2);
}

/// Constructs an [Int64Impl] with a given [int] value; zero by default.
factory Int64Impl([int value = 0]) {
int v0 = 0, v1 = 0, v2 = 0;
bool negative = false;
Expand Down Expand Up @@ -142,8 +141,6 @@ class Int64Impl implements Int64 {
return Int64Impl._masked(low, middle, high);
}

/// Constructs an [Int64Impl] from a pair of 32-bit integers having the value
/// [:((top & 0xffffffff) << 32) | (bottom & 0xffffffff):].
factory Int64Impl.fromInts(int top, int bottom) {
top &= 0xffffffff;
bottom &= 0xffffffff;
Expand Down Expand Up @@ -406,8 +403,6 @@ class Int64Impl implements Int64 {
return Int64Impl._masked(res0, res1, res2);
}

/// Returns [:true:] if this [Int64Impl] has the same numeric value as the
/// given object. The argument may be an [int] or an [IntX].
@override
bool operator ==(Object other) {
Int64Impl? o;
Expand Down Expand Up @@ -500,7 +495,6 @@ class Int64Impl implements Int64 {
return a0.bitLength;
}

/// Returns a hash code based on all the bits of this [Int64Impl].
@override
int get hashCode {
// TODO(sra): Should we ensure that hashCode values match corresponding int?
Expand All @@ -522,8 +516,6 @@ class Int64Impl implements Int64 {
return this;
}

/// Returns the number of leading zeros in this [Int64Impl] as an [int]
/// between 0 and 64.
@override
int numberOfLeadingZeros() {
int b2 = u.numberOfLeadingZeros(_h);
Expand All @@ -539,8 +531,6 @@ class Int64Impl implements Int64 {
}
}

/// Returns the number of trailing zeros in this [Int64Impl] as an [int]
/// between 0 and 64.
@override
int numberOfTrailingZeros() {
int zeros = u.numberOfTrailingZeros(_l);
Expand Down
6 changes: 0 additions & 6 deletions lib/src/int64_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import 'int64.dart';
import 'intx.dart';
import 'utilities.dart' as u;

/// An immutable 64-bit signed integer, in the range [-2^63, 2^63 - 1].
/// Arithmetic operations may overflow in order to maintain this range.
class Int64Impl implements Int64 {
final int _i;

Expand Down Expand Up @@ -171,12 +169,9 @@ class Int64Impl implements Int64 {
@override
int get bitLength => _i.bitLength;

/// Returns a hash code based on all the bits of this [Int64].
@override
int get hashCode => _i.hashCode;

/// Returns [:true:] if this [Int64] has the same numeric value as the given
/// object. The argument may be an [int] or an [IntX].
@override
bool operator ==(Object other) => _i == _promote(other);

Expand Down Expand Up @@ -237,7 +232,6 @@ class Int64Impl implements Int64 {
@override
Int32 toInt32() => Int32(_i);

/// Returns `this`.
@override
Int64 toInt64() => this;

Expand Down

0 comments on commit 8be51ce

Please sign in to comment.