Revert "Merge pull request #422 from svanharmelen/f-shaving-off-some-cpu-cycles"

This reverts commit 428cce2478, reversing
changes made to 517c5b2ea8.
This commit is contained in:
Mitchell Hashimoto 2014-10-20 23:14:14 -07:00
parent 428cce2478
commit 17d1bb7dde
1 changed files with 5 additions and 3 deletions

View File

@ -349,10 +349,12 @@ func (d *ResourceData) getSet(
var indexMap map[int]int
if len(parts) > 0 {
indexMap = make(map[int]int)
}
// Build the set from all the items using the given hash code
for i, v := range list {
code := s.add(v)
// Build the set from all the items using the given hash code
for i, v := range list {
code := s.add(v)
if indexMap != nil {
indexMap[code] = i
}
}