mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: eliminate unnecessary type conversions
Found by github.com/mdempsky/unconvert
Change-Id: I88ce10390a49ba768a4deaa0df9057c93c1164de
GitHub-Last-Rev: 3b0f7e8f74
GitHub-Pull-Request: golang/go#75974
Reviewed-on: https://go-review.googlesource.com/c/go/+/712940
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
694182d77b
commit
a5a249d6a6
61 changed files with 202 additions and 203 deletions
|
|
@ -806,7 +806,7 @@ func (l *Loader) SymVersion(i Sym) int {
|
|||
return pp.ver
|
||||
}
|
||||
r, li := l.toLocal(i)
|
||||
return int(abiToVer(r.Sym(li).ABI(), r.version))
|
||||
return abiToVer(r.Sym(li).ABI(), r.version)
|
||||
}
|
||||
|
||||
func (l *Loader) IsFileLocal(i Sym) bool {
|
||||
|
|
@ -2748,15 +2748,15 @@ func (l *Loader) AssignTextSymbolOrder(libs []*sym.Library, intlibs []bool, exts
|
|||
// We still need to record its presence in the current
|
||||
// package, as the trampoline pass expects packages
|
||||
// are laid out in dependency order.
|
||||
lib.DupTextSyms = append(lib.DupTextSyms, sym.LoaderSym(gi))
|
||||
lib.DupTextSyms = append(lib.DupTextSyms, gi)
|
||||
continue // symbol in different object
|
||||
}
|
||||
if dupok {
|
||||
lib.DupTextSyms = append(lib.DupTextSyms, sym.LoaderSym(gi))
|
||||
lib.DupTextSyms = append(lib.DupTextSyms, gi)
|
||||
continue
|
||||
}
|
||||
|
||||
lib.Textp = append(lib.Textp, sym.LoaderSym(gi))
|
||||
lib.Textp = append(lib.Textp, gi)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2769,7 +2769,7 @@ func (l *Loader) AssignTextSymbolOrder(libs []*sym.Library, intlibs []bool, exts
|
|||
lists := [2][]sym.LoaderSym{lib.Textp, lib.DupTextSyms}
|
||||
for i, list := range lists {
|
||||
for _, s := range list {
|
||||
sym := Sym(s)
|
||||
sym := s
|
||||
if !assignedToUnit.Has(sym) {
|
||||
textp = append(textp, sym)
|
||||
unit := l.SymUnit(sym)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue