diff options
author | xuri <xuri.me@gmail.com> | 2020-02-29 00:54:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 00:54:19 +0800 |
commit | 0ac7e18389b65a50424db923954fadccecc9cde1 (patch) | |
tree | 38465670b1db5227e8ee186bc02574bc6d0874d7 | |
parent | 821a5d86725eb80b3f9e806d91eca5859497c2fa (diff) | |
parent | 386a42dfa25f4ce5d5daf95e87ab65c528dbdd38 (diff) |
Merge pull request #589 from xxb-at-julichina/master
Reduce redundant memory copy in getRowHeight
-rw-r--r-- | rows.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -238,7 +238,8 @@ func (f *File) SetRowHeight(sheet string, row int, height float64) error { // name and row index. func (f *File) getRowHeight(sheet string, row int) int { xlsx, _ := f.workSheetReader(sheet) - for _, v := range xlsx.SheetData.Row { + for i := range xlsx.SheetData.Row { + v := &xlsx.SheetData.Row[i] if v.R == row+1 && v.Ht != 0 { return int(convertRowHeightToPixels(v.Ht)) } |