Commit c5076011 authored by Robert Dinu's avatar Robert Dinu Committed by Ian Lance Taylor

debug/pe: delete unnecessary type conversions

Fixes #7104.

LGTM=iant
R=golang-dev, iant
CC=golang-codereviews
https://golang.org/cl/61480049
parent 375b8ea4
...@@ -213,15 +213,15 @@ func NewFile(r io.ReaderAt) (*File, error) { ...@@ -213,15 +213,15 @@ func NewFile(r io.ReaderAt) (*File, error) {
s := new(Section) s := new(Section)
s.SectionHeader = SectionHeader{ s.SectionHeader = SectionHeader{
Name: name, Name: name,
VirtualSize: uint32(sh.VirtualSize), VirtualSize: sh.VirtualSize,
VirtualAddress: uint32(sh.VirtualAddress), VirtualAddress: sh.VirtualAddress,
Size: uint32(sh.SizeOfRawData), Size: sh.SizeOfRawData,
Offset: uint32(sh.PointerToRawData), Offset: sh.PointerToRawData,
PointerToRelocations: uint32(sh.PointerToRelocations), PointerToRelocations: sh.PointerToRelocations,
PointerToLineNumbers: uint32(sh.PointerToLineNumbers), PointerToLineNumbers: sh.PointerToLineNumbers,
NumberOfRelocations: uint16(sh.NumberOfRelocations), NumberOfRelocations: sh.NumberOfRelocations,
NumberOfLineNumbers: uint16(sh.NumberOfLineNumbers), NumberOfLineNumbers: sh.NumberOfLineNumbers,
Characteristics: uint32(sh.Characteristics), Characteristics: sh.Characteristics,
} }
s.sr = io.NewSectionReader(r, int64(s.SectionHeader.Offset), int64(s.SectionHeader.Size)) s.sr = io.NewSectionReader(r, int64(s.SectionHeader.Offset), int64(s.SectionHeader.Size))
s.ReaderAt = s.sr s.ReaderAt = s.sr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment