]> Cypherpunks repositories - gostls13.git/commitdiff
debug/pe: delete unnecessary type conversions
authorRobert Dinu <r@varp.se>
Wed, 12 Feb 2014 15:35:54 +0000 (07:35 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 12 Feb 2014 15:35:54 +0000 (07:35 -0800)
Fixes #7104.

LGTM=iant
R=golang-dev, iant
CC=golang-codereviews
https://golang.org/cl/61480049

src/pkg/debug/pe/file.go

index f521566efa7abb5a8c33e172f89afb2618af0b3f..a2859bf370372a7d6dc9ae639584c5ef8838da77 100644 (file)
@@ -213,15 +213,15 @@ func NewFile(r io.ReaderAt) (*File, error) {
                s := new(Section)
                s.SectionHeader = SectionHeader{
                        Name:                 name,
-                       VirtualSize:          uint32(sh.VirtualSize),
-                       VirtualAddress:       uint32(sh.VirtualAddress),
-                       Size:                 uint32(sh.SizeOfRawData),
-                       Offset:               uint32(sh.PointerToRawData),
-                       PointerToRelocations: uint32(sh.PointerToRelocations),
-                       PointerToLineNumbers: uint32(sh.PointerToLineNumbers),
-                       NumberOfRelocations:  uint16(sh.NumberOfRelocations),
-                       NumberOfLineNumbers:  uint16(sh.NumberOfLineNumbers),
-                       Characteristics:      uint32(sh.Characteristics),
+                       VirtualSize:          sh.VirtualSize,
+                       VirtualAddress:       sh.VirtualAddress,
+                       Size:                 sh.SizeOfRawData,
+                       Offset:               sh.PointerToRawData,
+                       PointerToRelocations: sh.PointerToRelocations,
+                       PointerToLineNumbers: sh.PointerToLineNumbers,
+                       NumberOfRelocations:  sh.NumberOfRelocations,
+                       NumberOfLineNumbers:  sh.NumberOfLineNumbers,
+                       Characteristics:      sh.Characteristics,
                }
                s.sr = io.NewSectionReader(r, int64(s.SectionHeader.Offset), int64(s.SectionHeader.Size))
                s.ReaderAt = s.sr