Skip to content

Commit 03b772f

Browse files
committed
parsing: remove debug check
the NOP function should be eliminated by the compiler.
1 parent 6a30171 commit 03b772f

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

debug_off.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
st "github.com/markus-wa/demoinfocs-golang/sendtables"
1010
)
1111

12-
const isDebug = false
13-
1412
func debugGameEvent(descriptor *msg.CSVCMsg_GameEventListDescriptorT, ge *msg.CSVCMsg_GameEvent) {
1513
// NOP
1614
}

debug_on.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import (
1111
st "github.com/markus-wa/demoinfocs-golang/sendtables"
1212
)
1313

14-
const isDebug = true
15-
1614
const (
1715
yes = "YES"
1816
no = "NO"

parsing.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,7 @@ func (p *Parser) parsePacket() {
295295
name = msg.SVC_Messages_name[int32(cmd)]
296296
}
297297

298-
if isDebug {
299-
debugUnhandledMessage(cmd, name)
300-
}
298+
debugUnhandledMessage(cmd, name)
301299

302300
if name != "" {
303301
// Handle additional net-messages as defined by the user

0 commit comments

Comments
 (0)