Skip to content

Commit

Permalink
style: fix code style issues with gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lint-action committed Jun 15, 2023
1 parent be4c600 commit 4beb91d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/bytecode.go
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ func (be BytecodeExp) run(c *Char) BytecodeValue {
continue
}
sys.bcStack.Push(BytecodeSF())
i += int(*(*int32)(unsafe.Pointer(&be[i]))) + 4
i += int(*(*int32)(unsafe.Pointer(&be[i]))) + 4
case OC_rdreset:
// NOP
case OC_run:
Expand Down
2 changes: 1 addition & 1 deletion src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@ func (c *Char) helper(id int32) *Char {
}
func (c *Char) helperByIndex(id int32) *Char {
for j, h := range sys.chars[c.playerNo][1:] {
if !h.sf(CSF_destroy) && ( (id-1) == int32(j) ) {
if !h.sf(CSF_destroy) && ((id - 1) == int32(j)) {
return h
}
}
Expand Down
28 changes: 14 additions & 14 deletions src/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ func newCompiler() *Compiler {

var triggerMap = map[string]int{
// redirections
"player": 0,
"parent": 0,
"root": 0,
"helper": 0,
"target": 0,
"partner": 0,
"enemy": 0,
"enemynear": 0,
"playerid": 0,
"p2": 0,
"stateowner": 0,
"helperindex": 0,
"player": 0,
"parent": 0,
"root": 0,
"helper": 0,
"target": 0,
"partner": 0,
"enemy": 0,
"enemynear": 0,
"playerid": 0,
"p2": 0,
"stateowner": 0,
"helperindex": 0,
// mugen triggers
"abs": 1,
"acos": 1,
Expand Down Expand Up @@ -1196,7 +1196,7 @@ func (c *Compiler) expValue(out *BytecodeExp, in *string,
opc = OC_playerid
case "helperindex":
opc = OC_helperindex
}
}
c.token = c.tokenizer(in)
if c.token == "(" {
c.token = c.tokenizer(in)
Expand All @@ -1219,7 +1219,7 @@ func (c *Compiler) expValue(out *BytecodeExp, in *string,
case OC_playerid:
return bvNone(), Error("Missing '(' after playerid")
case OC_helperindex:
return bvNone(), Error("Missing '(' after helperindex")
return bvNone(), Error("Missing '(' after helperindex")
}
}
if rd {
Expand Down
2 changes: 1 addition & 1 deletion src/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,7 @@ func triggerFunctions(l *lua.LState) {
}
l.Push(lua.LBool(ret))
return 1
})
})
// vanilla triggers
luaRegister(l, "ailevel", func(*lua.LState) int {
if !sys.debugWC.sf(CSF_noailevel) {
Expand Down

0 comments on commit 4beb91d

Please sign in to comment.