mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/shader: change the naming convention: Num -> Count
This commit is contained in:
parent
afed6a83c6
commit
dce34d2306
@ -517,7 +517,7 @@ func (cs *compileState) parseExpr(block *block, expr ast.Expr, markLocalVariable
|
||||
|
||||
var outParams []int
|
||||
for _, p := range f.ir.OutParams {
|
||||
idx := block.totalLocalVariableNum()
|
||||
idx := block.totalLocalVariableCount()
|
||||
block.vars = append(block.vars, variable{
|
||||
typ: p,
|
||||
})
|
||||
@ -736,7 +736,7 @@ func (cs *compileState) parseExpr(block *block, expr ast.Expr, markLocalVariable
|
||||
t.Length = len(e.Elts)
|
||||
}
|
||||
|
||||
idx := block.totalLocalVariableNum()
|
||||
idx := block.totalLocalVariableCount()
|
||||
block.vars = append(block.vars, variable{
|
||||
typ: t,
|
||||
})
|
||||
|
@ -95,10 +95,10 @@ type block struct {
|
||||
ir *shaderir.Block
|
||||
}
|
||||
|
||||
func (b *block) totalLocalVariableNum() int {
|
||||
func (b *block) totalLocalVariableCount() int {
|
||||
c := len(b.vars)
|
||||
if b.outer != nil {
|
||||
c += b.outer.totalLocalVariableNum()
|
||||
c += b.outer.totalLocalVariableCount()
|
||||
}
|
||||
return c
|
||||
}
|
||||
@ -354,7 +354,7 @@ func (cs *compileState) parseDecl(b *block, d ast.Decl) ([]shaderir.Stmt, bool)
|
||||
}
|
||||
|
||||
// base must be obtained before adding the variables.
|
||||
base := b.totalLocalVariableNum()
|
||||
base := b.totalLocalVariableCount()
|
||||
for _, v := range vs {
|
||||
b.addNamedLocalVariable(v.name, v.typ, d.Pos())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user