mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
EventTimeline::getFrames returns const & to avoid copying. (#2087)
* EventTimeline::getFrames returns const & to avoid copying. * EventTimeline::getFrames returns const & to avoid copying.
This commit is contained in:
parent
28727aff22
commit
674fab37f0
@ -51,7 +51,7 @@ namespace spine {
|
||||
/// Sets the time and value of the specified keyframe.
|
||||
void setFrame(size_t frameIndex, Event* event);
|
||||
|
||||
Vector<float> getFrames();
|
||||
const Vector<float>& getFrames();
|
||||
Vector<Event*>& getEvents();
|
||||
size_t getFrameCount();
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ void EventTimeline::setFrame(size_t frameIndex, Event *event) {
|
||||
_events[frameIndex] = event;
|
||||
}
|
||||
|
||||
Vector<float> EventTimeline::getFrames() { return _frames; }
|
||||
const Vector<float>& EventTimeline::getFrames() { return _frames; }
|
||||
|
||||
Vector<Event *> &EventTimeline::getEvents() { return _events; }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user