From bd0ff43d83053edbd0809f8bd9ca3cc2abc687d9 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Mon, 28 Mar 2022 11:39:43 -0500 Subject: Remove extra ints in function declarations --- sd.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sd.go b/sd.go index 5f5b7aa..ac1d46d 100644 --- a/sd.go +++ b/sd.go @@ -16,7 +16,7 @@ var file = flag.String("f", "cards", "cards file") var sum = 0 var seg = []int{} -func build(a *sql.Rows, l int, r int, n int) { +func build(a *sql.Rows, l, r, n int) { if l == r { a.Next() a.Scan(&seg[n]) @@ -29,7 +29,7 @@ func build(a *sql.Rows, l int, r int, n int) { seg[n] = seg[n<<1] + seg[n<<1|1] } -func update(x int, v int, l int, r int, n int) { +func update(x, v, l, r, n int) { if l == r { seg[n] = v return @@ -43,7 +43,7 @@ func update(x int, v int, l int, r int, n int) { seg[n] = seg[n<<1] + seg[n<<1|1] } -func query(v int, l int, r int, n int) (int, int) { +func query(v, l, r, n int) (int, int) { if l == r { return seg[n], l } @@ -92,7 +92,7 @@ func main() { w, i := query(x, 0, N-1, 1) fmt.Println(w) fmt.Println(i) - + // Get card contents from database var key, val string db.QueryRow("SELECT key, val FROM cards WHERE idx=?", i).Scan(&key, &val) -- cgit v1.2.3-70-g09d2