We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80ed68b commit 14d0a93Copy full SHA for 14d0a93
memiavl/mem_node.go
@@ -88,7 +88,7 @@ func (node *MemNode) Hash() []byte {
88
}
89
90
func (node *MemNode) updateHeightSize() {
91
- node.height = maxUInt8(node.left.Height(), node.right.Height()) + 1
+ node.height = max(node.left.Height(), node.right.Height()) + 1
92
node.size = node.left.Size() + node.right.Size()
93
94
@@ -210,9 +210,3 @@ func EncodeBytes(w io.Writer, bz []byte) error {
210
return err
211
212
213
-func maxUInt8(a, b uint8) uint8 {
214
- if a > b {
215
- return a
216
- }
217
- return b
218
-}
0 commit comments