X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.cpp;h=c03776b4b8e0a8b53bbb9ec04f625bff74a707c5;hb=9e47a2f661b9d292598ef0277e507458e3dad62f;hp=ed34faed2c9a1411ce7417c06da9ab68f5e1fd40;hpb=fa0b850bb90894ae9686e0ad7a17ed1b2aafb5d1;p=nageru diff --git a/theme.cpp b/theme.cpp index ed34fae..c03776b 100644 --- a/theme.cpp +++ b/theme.cpp @@ -1043,6 +1043,7 @@ Theme::Chain Theme::get_chain(unsigned num, float t, unsigned width, unsigned he // TODO: Can we do better, e.g. by running setup_chain() and seeing what it references? // Actually, setup_chain does maybe hold all the references we need now anyway? + chain.input_frames.reserve(num_cards * FRAME_HISTORY_LENGTH); for (unsigned card_index = 0; card_index < num_cards; ++card_index) { for (unsigned frame_num = 0; frame_num < FRAME_HISTORY_LENGTH; ++frame_num) { chain.input_frames.push_back(input_state.buffered_frames[card_index][frame_num].frame);