summaryrefslogtreecommitdiff
path: root/desktop/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-24 00:19:18 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-28 13:46:39 +0200
commit6e060ba9e8c4f34b5ad12908e0c0b5f65c533869 (patch)
treed54f4f447b216fa11a437a96e2436b98ade3971e /desktop/inc
parentc9a405b3bcc0d3f5fdb6b4386831a4d4b2897c74 (diff)
optimize removing from the LOK flush queue
All the lambdas check for event type, so it makes sense to first separately check the type and only then possibly call the lambda. Especially since 3b3e4ee97af23f21 separated the types for better searching. Change-Id: I144c88f5319ac2141336e1aa3c4ffd7b38265af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122673 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'desktop/inc')
-rw-r--r--desktop/inc/lib/init.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index e6b4f00a5427..2693e67eb718 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -128,9 +128,12 @@ namespace desktop {
typedef std::vector<CallbackData> queue_type2;
private:
+ bool removeAll(int type);
+ bool removeAll(int type, const std::function<bool (const CallbackData&)>& rTestFunc);
bool removeAll(const std::function<bool (int, const CallbackData&)>& rTestFunc);
bool processInvalidateTilesEvent(int type, CallbackData& aCallbackData);
bool processWindowEvent(int type, CallbackData& aCallbackData);
+ queue_type2::iterator toQueue2(queue_type1::iterator);
queue_type2::reverse_iterator toQueue2(queue_type1::reverse_iterator);
/** we frequently want to scan the queue, and mostly when we do so, we only care about the element type