mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +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.
|
||||
func (clks *clocksType) clock(cix clockIndex) *clock {
|
||||
return &clock{
|
||||
func (clks *clocksType) clock(cix clockIndex) clock {
|
||||
return clock{
|
||||
&clks.clk[cix],
|
||||
cix,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user