Skip to content

Refactor: use std::vector for Action storage #757

@gvnnz

Description

@gvnnz

Let's get rid of the old std::map<Frame, Actions[]> container and store all actions in a std::vector<Action>. Actions must be sorted frame-wise:

actions = [
   {id = 1, frame = 0, ...},
   {id = 2, frame = 0, ...},
   {id = 3, frame = 2400, ...},
   {id = 4, frame = 5000, ...},
   {id = 5, frame = 5000, ...},
]

When requested by the Sequencer (getActionsOnFrame()...) we simply return a std::span<Action> of the original std::vector<Action> container (or better, a subspan), pointing to the exact frame range. For example: getActionsOnFrame(5000) would return a subspan at position 3 of length 2.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions