mirror of
https://github.com/safing/portbase
synced 2025-09-04 11:40:23 +00:00
Remove branching in fastcheckLevel() in order to speedup the function
Is just a minor fix, but since I spotted it and the function is called fast*, I thought it is might worth doing ...
This commit is contained in:
parent
f16bd27773
commit
150cede3f8
1 changed files with 1 additions and 4 deletions
|
@ -216,8 +216,5 @@ func ErrorTracef(ctx context.Context, things ...interface{}) (ok bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func fastcheckLevel(level severity) bool {
|
func fastcheckLevel(level severity) bool {
|
||||||
if uint32(level) < atomic.LoadUint32(logLevel) {
|
return uint32(level) >= atomic.LoadUint32(logLevel)
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue