From b5c33469fad2541460c6a66413c03f97e2094eb5 Mon Sep 17 00:00:00 2001 From: jim teeuwen Date: Wed, 7 Dec 2011 13:57:00 +0100 Subject: [PATCH] fix for weekly 2011.12.06 --- node.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node.go b/node.go index 95992e7..40faeaf 100644 --- a/node.go +++ b/node.go @@ -78,7 +78,7 @@ func (this *Node) I64(namespace, name string) int64 { func (this *Node) U(namespace, name string) uint { if node := rec_SelectNode(this, namespace, name); node != nil && node.Value != "" { n, _ := strconv.ParseUint(node.Value, 10, 0) - return n + return uint(n) } return 0 } @@ -96,7 +96,7 @@ func (this *Node) U64(namespace, name string) uint64 { func (this *Node) F32(namespace, name string) float32 { if node := rec_SelectNode(this, namespace, name); node != nil && node.Value != "" { n, _ := strconv.ParseFloat(node.Value, 32) - return n + return float32(n) } return 0 } @@ -142,7 +142,7 @@ func (this *Node) Ai(namespace, name string) int { func (this *Node) Au(namespace, name string) uint { if s := this.As(namespace, name); s != "" { n, _ := strconv.ParseUint(s, 10, 0) - return n + return uint(n) } return 0 } @@ -169,7 +169,7 @@ func (this *Node) Ai64(namespace, name string) int64 { func (this *Node) Af32(namespace, name string) float32 { if s := this.As(namespace, name); s != "" { n, _ := strconv.ParseFloat(s, 32) - return n + return float32(n) } return 0 }