mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-30 09:33:36 +00:00
vm: microoptimize RegisterInteropFuncs()
Avoid useless copying.
This commit is contained in:
parent
09223236f9
commit
0afaff2f79
1 changed files with 2 additions and 2 deletions
|
@ -129,8 +129,8 @@ func (v *VM) RegisterInteropFunc(name string, f InteropFunc, price int) {
|
||||||
// the VM. Effectively it's a batched version of RegisterInteropFunc.
|
// the VM. Effectively it's a batched version of RegisterInteropFunc.
|
||||||
func (v *VM) RegisterInteropFuncs(interops map[string]InteropFuncPrice) {
|
func (v *VM) RegisterInteropFuncs(interops map[string]InteropFuncPrice) {
|
||||||
// We allow reregistration here.
|
// We allow reregistration here.
|
||||||
for name, funPrice := range interops {
|
for name := range interops {
|
||||||
v.interop[name] = funPrice
|
v.interop[name] = interops[name]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue