From db7047c394edbcc713accda2a15f201a5b400ef7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 13 Jul 2022 20:16:46 -0600 Subject: Misc tidy up --- lib/btrfs/internal/misc.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/btrfs/internal/misc.go') diff --git a/lib/btrfs/internal/misc.go b/lib/btrfs/internal/misc.go index eb5c287..3bc5402 100644 --- a/lib/btrfs/internal/misc.go +++ b/lib/btrfs/internal/misc.go @@ -26,15 +26,17 @@ func (k Key) String() string { } func (a Key) Cmp(b Key) int { - if d := containers.CmpUint(a.ObjectID, b.ObjectID); d != 0 { + if d := containers.NativeCmp(a.ObjectID, b.ObjectID); d != 0 { return d } - if d := containers.CmpUint(a.ItemType, b.ItemType); d != 0 { + if d := containers.NativeCmp(a.ItemType, b.ItemType); d != 0 { return d } - return containers.CmpUint(a.Offset, b.Offset) + return containers.NativeCmp(a.Offset, b.Offset) } +var _ containers.Ordered[Key] = Key{} + type Time struct { Sec int64 `bin:"off=0x0, siz=0x8"` // Number of seconds since 1970-01-01T00:00:00Z. NSec uint32 `bin:"off=0x8, siz=0x4"` // Number of nanoseconds since the beginning of the second. -- cgit v1.2.3-54-g00ecf