MCPcopy
hub / github.com/github/git-sizer / AdjustMaxIfPossible

Method AdjustMaxIfPossible

counts/counts.go:53–60  ·  view source on GitHub ↗

AdjustMaxIfPossible adjusts `*n1` to be `max(*n1, n2)`. Return true iff `n2` was greater than or equal to `*n1`.

(n2 Count32)

Source from the content-addressed store, hash-verified

51// AdjustMaxIfPossible adjusts `*n1` to be `max(*n1, n2)`. Return true
52// iff `n2` was greater than or equal to `*n1`.
53func (n1 *Count32) AdjustMaxIfPossible(n2 Count32) bool {
54 if n2 < *n1 {
55 return false
56 }
57
58 *n1 = n2
59 return true
60}
61
62// Count64 is a count of something, capped at math.MaxUint64.
63type Count64 uint64

Callers 1

recordCommitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected