aboutsummaryrefslogtreecommitdiff
path: root/state.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-11-07 19:39:37 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-11-26 18:27:22 +0900
commit0e9c56561888cbd786d099bc7d004223e7406e6a (patch)
tree2ee07e8c451141535e543f634103242e1d1d728a /state.cpp
parent6c95d3787325fdb47e45275974a8edfb3555cfdb (diff)
downloadlibquotient-0e9c56561888cbd786d099bc7d004223e7406e6a.tar.gz
libquotient-0e9c56561888cbd786d099bc7d004223e7406e6a.zip
Room: provide ability to find an event in the timeline by its id
A new hashmap, eventsIndex, is provided, that allows you to find the event in the timeline if you have eventId. This hashmap uses the fact that deque iterators don't invalidate upon insertion of elements to either end of the deque. Thanks to that, promoteReadMarker() and doAddNewMessageEvents() have been considerably simplified; also, it should be easier now to calculate event indices without rolling back and forth over the timeline.
Diffstat (limited to 'state.cpp')
0 files changed, 0 insertions, 0 deletions