diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-25 04:15:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-25 04:15:17 +0200 |
commit | eac2ace1c14c1ae0564d757b26a359c6bd4b754a (patch) | |
tree | 855b98a19b6a302663a2d26e3ed6ca69110d1ce0 /src/Body.cpp | |
parent | 6cb237cfba67e1a15d475dccfb706bcc179afe71 (diff) |
Matrix: fetch previous messages when reaching the top
Diffstat (limited to 'src/Body.cpp')
-rw-r--r-- | src/Body.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index 52999e5..f97d611 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -157,6 +157,14 @@ namespace QuickMedia { selected_item = 0; } + // TODO: Optimize with memcpy and changing capacity before loop + void Body::prepend_items(BodyItems new_items) { + for(auto &body_item : new_items) { + items.insert(items.begin(), std::move(body_item)); + } + } + + // TODO: Optimize with memcpy and changing capacity before loop void Body::append_items(BodyItems new_items) { for(auto &body_item : new_items) { items.push_back(std::move(body_item)); |