Skip to content

Commit 23ee21a

Browse files
committed
linting fixes
1 parent c2b617a commit 23ee21a

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

pkg/demoinfocs/sendtables2/field_path.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type fieldPathOp struct {
2222

2323
var fieldPathTable = []fieldPathOp{
2424
{"PlusOne", 36271, func(r *reader, fp *fieldPath) {
25-
fp.path[fp.last] += 1
25+
fp.path[fp.last]++
2626
}},
2727
{"PlusTwo", 10334, func(r *reader, fp *fieldPath) {
2828
fp.path[fp.last] += 2
@@ -45,12 +45,12 @@ var fieldPathTable = []fieldPathOp{
4545
fp.path[fp.last] = r.readUBitVarFieldPath()
4646
}},
4747
{"PushOneLeftDeltaOneRightZero", 521, func(r *reader, fp *fieldPath) {
48-
fp.path[fp.last] += 1
48+
fp.path[fp.last]++
4949
fp.last++
5050
fp.path[fp.last] = 0
5151
}},
5252
{"PushOneLeftDeltaOneRightNonZero", 2942, func(r *reader, fp *fieldPath) {
53-
fp.path[fp.last] += 1
53+
fp.path[fp.last]++
5454
fp.last++
5555
fp.path[fp.last] = r.readUBitVarFieldPath()
5656
}},
@@ -103,21 +103,21 @@ var fieldPathTable = []fieldPathOp{
103103
fp.path[fp.last] = int(r.readBits(5))
104104
}},
105105
{"PushTwoLeftDeltaOne", 0, func(r *reader, fp *fieldPath) {
106-
fp.path[fp.last] += 1
106+
fp.path[fp.last]++
107107
fp.last++
108108
fp.path[fp.last] += r.readUBitVarFieldPath()
109109
fp.last++
110110
fp.path[fp.last] += r.readUBitVarFieldPath()
111111
}},
112112
{"PushTwoPack5LeftDeltaOne", 0, func(r *reader, fp *fieldPath) {
113-
fp.path[fp.last] += 1
113+
fp.path[fp.last]++
114114
fp.last++
115115
fp.path[fp.last] += int(r.readBits(5))
116116
fp.last++
117117
fp.path[fp.last] += int(r.readBits(5))
118118
}},
119119
{"PushThreeLeftDeltaOne", 0, func(r *reader, fp *fieldPath) {
120-
fp.path[fp.last] += 1
120+
fp.path[fp.last]++
121121
fp.last++
122122
fp.path[fp.last] += r.readUBitVarFieldPath()
123123
fp.last++
@@ -126,7 +126,7 @@ var fieldPathTable = []fieldPathOp{
126126
fp.path[fp.last] += r.readUBitVarFieldPath()
127127
}},
128128
{"PushThreePack5LeftDeltaOne", 0, func(r *reader, fp *fieldPath) {
129-
fp.path[fp.last] += 1
129+
fp.path[fp.last]++
130130
fp.last++
131131
fp.path[fp.last] += int(r.readBits(5))
132132
fp.last++
@@ -188,15 +188,15 @@ var fieldPathTable = []fieldPathOp{
188188
}},
189189
{"PopOnePlusOne", 2, func(r *reader, fp *fieldPath) {
190190
fp.pop(1)
191-
fp.path[fp.last] += 1
191+
fp.path[fp.last]++
192192
}},
193193
{"PopOnePlusN", 0, func(r *reader, fp *fieldPath) {
194194
fp.pop(1)
195195
fp.path[fp.last] += r.readUBitVarFieldPath() + 1
196196
}},
197197
{"PopAllButOnePlusOne", 1837, func(r *reader, fp *fieldPath) {
198198
fp.pop(fp.last)
199-
fp.path[0] += 1
199+
fp.path[0]++
200200
}},
201201
{"PopAllButOnePlusN", 149, func(r *reader, fp *fieldPath) {
202202
fp.pop(fp.last)
@@ -212,7 +212,7 @@ var fieldPathTable = []fieldPathOp{
212212
}},
213213
{"PopNPlusOne", 0, func(r *reader, fp *fieldPath) {
214214
fp.pop(r.readUBitVarFieldPath())
215-
fp.path[fp.last] += 1
215+
fp.path[fp.last]++
216216
}},
217217
{"PopNPlusN", 0, func(r *reader, fp *fieldPath) {
218218
fp.pop(r.readUBitVarFieldPath())
@@ -234,7 +234,7 @@ var fieldPathTable = []fieldPathOp{
234234
}
235235
}},
236236
{"NonTopoPenultimatePlusOne", 271, func(r *reader, fp *fieldPath) {
237-
fp.path[fp.last-1] += 1
237+
fp.path[fp.last-1]++
238238
}},
239239
{"NonTopoComplexPack4Bits", 99, func(r *reader, fp *fieldPath) {
240240
for i := 0; i <= fp.last; i++ {

pkg/demoinfocs/sendtables2/reader.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ func (r *reader) remBytes() uint32 {
3939

4040
// nextByte reads the next byte from the buffer
4141
func (r *reader) nextByte() byte {
42-
r.pos += 1
42+
r.pos++
43+
4344
if r.pos > r.size {
4445
_panicf("nextByte: insufficient buffer (%d of %d)", r.pos, r.size)
4546
}
47+
4648
return r.buf[r.pos-1]
4749
}
4850

0 commit comments

Comments
 (0)