diff options
author | David Symonds <dsymonds@golang.org> | 2015-01-06 07:56:48 +1100 |
---|---|---|
committer | David Symonds <dsymonds@golang.org> | 2015-01-06 07:56:48 +1100 |
commit | 60976d353effd937b53a171e7493148a9969e39a (patch) | |
tree | d80b0947d24e1de59555ad0ab5af8b602d2cd097 | |
parent | 3ea3e05dbfae8d2dd0cc219b5f0f0ba4606d15eb (diff) | |
download | protobuf-60976d353effd937b53a171e7493148a9969e39a.tar.gz |
Simplify Uint32 helper function to be like the others.
-rw-r--r-- | proto/lib.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/proto/lib.go b/proto/lib.go index e8b6549..fe0818c 100644 --- a/proto/lib.go +++ b/proto/lib.go @@ -323,9 +323,7 @@ func Float64(v float64) *float64 { // Uint32 is a helper routine that allocates a new uint32 value // to store v and returns a pointer to it. func Uint32(v uint32) *uint32 { - p := new(uint32) - *p = v - return p + return &v } // Uint64 is a helper routine that allocates a new uint64 value |