Browse Source

Remove runtime package dependency, properly get max int.

trinchan 11 years ago
parent
commit
416524e8d2
1 changed files with 1 additions and 6 deletions
  1. 1 6
      lib.go

+ 1 - 6
lib.go

@@ -8,7 +8,6 @@ import (
 	"io"
 	"math"
 	"path"
-	"runtime"
 	"strconv"
 	"strings"
 )
@@ -215,11 +214,7 @@ func calculateMaxMinFromWorksheet(worksheet *xlsxWorksheet) (minx, miny, maxx, m
 	// Note, this method could be very slow for large spreadsheets.
 	var x, y int
 	var maxVal int
-	if runtime.GOARCH == "386" {
-		maxVal = math.MaxInt32
-	} else {
-		maxVal = math.MaxInt64
-	}
+	maxVal = int(^uint(0) >> 1)
 	minx = maxVal
 	miny = maxVal
 	maxy = 0