[Libreoffice-commits] core.git: sd/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 10 05:07:19 UTC 2019
sd/source/ui/framework/configuration/ChangeRequestQueue.hxx | 4 ++--
sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 28bd55310896deda96ee7d30828239fa5ed03747
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu May 9 20:10:09 2019 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri May 10 07:06:44 2019 +0200
Use std::queue instead of list for ChangeRequestQueueProcessor (sd)
Change-Id: I2520efb92e4aef399b684262e0b7daa72d212598
Reviewed-on: https://gerrit.libreoffice.org/72073
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx b/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx
index 402774412274..d63a64822c49 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx
@@ -22,7 +22,7 @@
#include <com/sun/star/uno/Reference.hxx>
-#include <list>
+#include <queue>
namespace com { namespace sun { namespace star { namespace drawing { namespace framework { class XConfigurationChangeRequest; } } } } }
@@ -33,7 +33,7 @@ namespace sd { namespace framework {
ChangeRequestQueueProcessor to process these requests.
*/
class ChangeRequestQueue
- : public ::std::list<css::uno::Reference< css::drawing::framework::XConfigurationChangeRequest> >
+ : public ::std::queue<css::uno::Reference< css::drawing::framework::XConfigurationChangeRequest> >
{
public:
/** Create an empty queue.
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
index 7ac69647522c..7934b5dd5e8b 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
@@ -91,7 +91,7 @@ void ChangeRequestQueueProcessor::AddRequest (
TraceRequest(rxRequest);
#endif
- maQueue.push_back(rxRequest);
+ maQueue.push(rxRequest);
StartProcessing();
}
@@ -135,7 +135,7 @@ void ChangeRequestQueueProcessor::ProcessOneEvent()
// Get and remove the first entry from the queue.
Reference<XConfigurationChangeRequest> xRequest (maQueue.front());
- maQueue.pop_front();
+ maQueue.pop();
// Execute the change request.
if (xRequest.is())
@@ -176,7 +176,8 @@ void ChangeRequestQueueProcessor::ProcessUntilEmpty()
void ChangeRequestQueueProcessor::Clear()
{
::osl::MutexGuard aGuard (maMutex);
- maQueue.clear();
+ ChangeRequestQueue aEmpty;
+ maQueue.swap(aEmpty);
}
} } // end of namespace sd::framework::configuration
More information about the Libreoffice-commits
mailing list