0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd:Ⓜ️:acquire: Add conditions to skip subroutine when opts cause overlap.

This commit is contained in:
Jason Volk 2020-12-18 18:47:34 -08:00
parent a029cdec5f
commit c9b4fe6797

View file

@ -255,6 +255,21 @@ ircd::m::acquire::fetch_history(event::idx &ref_min)
void
ircd::m::acquire::acquire_timeline()
{
// We only enter this routine if the options are sufficient. Otherwise
// the functionality here will overlap with acquire_history() and be
// a more expensive form of the same thing.
const bool sufficient_options
{
false
|| !opts.history
|| opts.viewport_size
|| opts.depth.first
|| opts.depth.second
};
if(!sufficient_options)
return;
event::idx ref_min
{
opts.ref.first