mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
avoid allocating clock on heap
This commit is contained in:
@@ -83,8 +83,8 @@ type clock struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clock returns the clock identified by cix.
|
// clock returns the clock identified by cix.
|
||||||
func (clks *clocksType) clock(cix clockIndex) *clock {
|
func (clks *clocksType) clock(cix clockIndex) clock {
|
||||||
return &clock{
|
return clock{
|
||||||
&clks.clk[cix],
|
&clks.clk[cix],
|
||||||
cix,
|
cix,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user