~shabbyrobe/gocovmerge

c01c9239511539a811674313e55794e950f3c7ab — Wade Simmons 8 years ago af8dc8e
cleanup
1 files changed, 0 insertions(+), 3 deletions(-)

M gocovmerge.go
M gocovmerge.go => gocovmerge.go +0 -3
@@ 26,7 26,6 @@ func mergeProfiles(p *cover.Profile, merge *cover.Profile) {
}

func mergeProfileBlock(p *cover.Profile, pb cover.ProfileBlock, startIndex int) int {
	var inserted, combined int
	sortFunc := func(i int) bool {
		pi := p.Blocks[i+startIndex]
		return pi.StartLine >= pb.StartLine && (pi.StartLine != pb.StartLine || pi.StartCol >= pb.StartCol)


@@ 42,7 41,6 @@ func mergeProfileBlock(p *cover.Profile, pb cover.ProfileBlock, startIndex int) 
			log.Fatalf("OVERLAP MERGE: %v %v %v", p.FileName, p.Blocks[i], pb)
		}
		p.Blocks[i].Count |= pb.Count
		combined++
	} else {
		if i > 0 {
			pa := p.Blocks[i-1]


@@ 59,7 57,6 @@ func mergeProfileBlock(p *cover.Profile, pb cover.ProfileBlock, startIndex int) 
		p.Blocks = append(p.Blocks, cover.ProfileBlock{})
		copy(p.Blocks[i+1:], p.Blocks[i:])
		p.Blocks[i] = pb
		inserted++
	}
	return i + 1
}