mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd:Ⓜ️:events: Improve robustness of loop conditions; range controls.
This commit is contained in:
parent
64e5df1d86
commit
9c4aea4ca6
1 changed files with 3 additions and 3 deletions
|
@ -214,7 +214,7 @@ ircd::m::events::for_each(const range &range,
|
|||
if(!closure(event_idx, event))
|
||||
return false;
|
||||
|
||||
return --limit;
|
||||
return --limit > 0L;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ ircd::m::events::for_each(const range &range,
|
|||
auto start
|
||||
{
|
||||
ascending?
|
||||
range.first:
|
||||
std::min(range.first, vm::sequence::retired + 1):
|
||||
std::min(range.first, vm::sequence::retired)
|
||||
};
|
||||
|
||||
|
@ -284,7 +284,7 @@ ircd::m::events::for_each(const range &range,
|
|||
if(!closure(event_idx))
|
||||
return false;
|
||||
|
||||
return --limit;
|
||||
return --limit > 0L;
|
||||
}});
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue