mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-22 15:04:36 -04:00
refactor(tracker): rewrite params to avoid heap allocations
This commit is contained in:
parent
4f779edb88
commit
7ef868a434
@ -76,16 +76,16 @@ func (m *Model) UnitHintInfo(id int) (instrIndex int, unitType string, ok bool)
|
||||
return fu.instrumentIndex, fu.unit.Type, ok
|
||||
}
|
||||
|
||||
func (m *Model) ParameterInfo(unitId int, paramName string) (isSendTarget bool, tooltip string, exists bool) {
|
||||
func (m *Model) ParameterInfo(unitId int, paramName string) (tooltip string, ok bool) {
|
||||
du, ok1 := m.derived.forUnit[unitId]
|
||||
if !ok1 {
|
||||
return false, "", false
|
||||
return "", false
|
||||
}
|
||||
dp, ok2 := du.forParameter[paramName]
|
||||
if !ok2 {
|
||||
return false, "", false
|
||||
return "", false
|
||||
}
|
||||
return len(dp.sendSources) > 0, dp.sendTooltip, true
|
||||
return dp.sendTooltip, len(dp.sendSources) > 0
|
||||
}
|
||||
|
||||
func (m *Model) TrackTitle(index int) string {
|
||||
|
Reference in New Issue
Block a user