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

Method AdjustMaxIfNecessary

counts/counts.go:42–49  ·  view source on GitHub ↗

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

(n2 Count32)

Source from the content-addressed store, hash-verified

40// AdjustMaxIfNecessary adjusts `*n1` to be `max(*n1, n2)`. Return
41// true iff `n2` was greater than `*n1`.
42func (n1 *Count32) AdjustMaxIfNecessary(n2 Count32) bool {
43 if n2 <= *n1 {
44 return false
45 }
46
47 *n1 = n2
48 return true
49}
50
51// AdjustMaxIfPossible adjusts `*n1` to be `max(*n1, n2)`. Return true
52// iff `n2` was greater than or equal to `*n1`.

Callers 8

addDescendentMethod · 0.45
addBlobMethod · 0.45
addLinkMethod · 0.45
addSubmoduleMethod · 0.45
addParentMethod · 0.45
recordBlobMethod · 0.45
recordTreeMethod · 0.45
recordTagMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected