]> Cypherpunks repositories - gostls13.git/commitdiff
math/bits: fix example for OnesCount64
authorFrancesc Campoy Flores <campoy@golang.org>
Sat, 5 Aug 2017 00:03:33 +0000 (17:03 -0700)
committerFrancesc Campoy Flores <campoy@golang.org>
Sat, 5 Aug 2017 00:20:37 +0000 (00:20 +0000)
Erroneously called OnesCount instead of OnesCount64

Change-Id: Ie877e43f213253e45d31f64931c4a15915849586
Reviewed-on: https://go-review.googlesource.com/53410
Reviewed-by: Chris Broadfoot <cbro@golang.org>
src/math/bits/example_test.go

index 9836245cfb925f01917e53c4c4ee75f66206b7ce..a43d1f365f60023d69538d5afe8123c20b4dbc02 100644 (file)
@@ -71,7 +71,7 @@ func ExampleOnesCount32() {
 
 func ExampleOnesCount64() {
        fmt.Printf("%b\n", 14)
-       fmt.Println(bits.OnesCount(14))
+       fmt.Println(bits.OnesCount64(14))
        // Output:
        // 1110
        // 3