diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-08-17 08:40:31 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-08-17 09:28:59 +0200 |
commit | 0b85a66cc3d8e54747506089f92e154dc7665bfe (patch) | |
tree | 8a4a755a6803649e12e018089fc810946a5257f6 /desktop/source | |
parent | 78fb8fe0c5a58bc4d5074de66e77c20c3a441fd3 (diff) |
Return std::optional instead of using bool* argument
Change-Id: I47f03411a6677f22291bea4dc06920ab9052349a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138399
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 7f27f96d9efa..f9e871fb99f1 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2119,11 +2119,10 @@ void CallbackFlushHandler::enqueueUpdatedTypes() void CallbackFlushHandler::enqueueUpdatedType( int type, const SfxViewShell* viewShell, int viewId ) { - bool ignore = false; - OString payload = viewShell->getLOKPayload( type, viewId, &ignore ); - if(ignore) + std::optional<OString> payload = viewShell->getLOKPayload( type, viewId ); + if(!payload) return; // No actual payload to send. - CallbackData callbackData(payload.getStr(), viewId); + CallbackData callbackData(payload->getStr(), viewId); m_queue1.emplace_back(type); m_queue2.emplace_back(callbackData); SAL_INFO("lok", "Queued updated [" << type << "]: [" << callbackData.getPayload() |