Simplify const syntax, remove redundant map lookups in buildCells

This commit is contained in:
Ian Gulliver
2026-02-20 17:31:03 -07:00
parent 0bfa11c640
commit 7d398082dd

View File

@@ -2,9 +2,7 @@ package main
import "fmt"
const (
cueTrackID = "_cue"
)
const cueTrackID = "_cue"
type Show struct {
Tracks []*Track `json:"tracks"`
@@ -189,11 +187,11 @@ func (tl *Timeline) findCell(blockID, event string) *TimelineCell {
func (tl *Timeline) buildCells(endChains map[string]bool) {
lastOnTrack := map[string]*Block{}
for _, block := range tl.show.Blocks {
lastOnTrack[tl.Blocks[block.ID].Track] = block
lastOnTrack[block.Track] = block
}
for _, block := range tl.show.Blocks {
track := tl.trackIdx[tl.Blocks[block.ID].Track]
track := tl.trackIdx[block.Track]
var cells []*TimelineCell
switch block.Type {
case "cue":