summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-08 16:55:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 08:40:57 +0200
commit4c09f8e087cae598efbb78759110c03ed10e3a3a (patch)
tree963bf5ef462eacc2195ffb23d22c6e7e5fd0d627 /configmgr
parent58edb05341494dfaa3d3ce33505b97961d5f2ea9 (diff)
clang-tidy modernize-use-emplace in c*
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx38
-rw-r--r--configmgr/source/broadcaster.cxx19
-rw-r--r--configmgr/source/components.cxx2
3 files changed, 25 insertions, 34 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 0f062b30bdf7..6eb692cc5430 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -249,25 +249,24 @@ css::uno::Sequence< OUString > Access::getSupportedServiceNames()
osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
std::vector<OUString> services;
- services.push_back("com.sun.star.configuration.ConfigurationAccess");
+ services.emplace_back("com.sun.star.configuration.ConfigurationAccess");
if (getRootAccess()->isUpdate()) {
- services.push_back(
- "com.sun.star.configuration.ConfigurationUpdateAccess");
+ services.emplace_back("com.sun.star.configuration.ConfigurationUpdateAccess");
}
- services.push_back("com.sun.star.configuration.HierarchyAccess");
- services.push_back("com.sun.star.configuration.HierarchyElement");
+ services.emplace_back("com.sun.star.configuration.HierarchyAccess");
+ services.emplace_back("com.sun.star.configuration.HierarchyElement");
if (getNode()->kind() == Node::KIND_GROUP) {
- services.push_back("com.sun.star.configuration.GroupAccess");
- services.push_back("com.sun.star.configuration.PropertyHierarchy");
+ services.emplace_back("com.sun.star.configuration.GroupAccess");
+ services.emplace_back("com.sun.star.configuration.PropertyHierarchy");
if (getRootAccess()->isUpdate()) {
- services.push_back("com.sun.star.configuration.GroupUpdate");
+ services.emplace_back("com.sun.star.configuration.GroupUpdate");
}
} else {
- services.push_back("com.sun.star.configuration.SetAccess");
- services.push_back("com.sun.star.configuration.SimpleSetAccess");
+ services.emplace_back("com.sun.star.configuration.SetAccess");
+ services.emplace_back("com.sun.star.configuration.SimpleSetAccess");
if (getRootAccess()->isUpdate()) {
- services.push_back("com.sun.star.configuration.SetUpdate");
- services.push_back("com.sun.star.configuration.SimpleSetUpdate");
+ services.emplace_back("com.sun.star.configuration.SetUpdate");
+ services.emplace_back("com.sun.star.configuration.SimpleSetUpdate");
}
}
addSupportedServiceNames(&services);
@@ -1672,11 +1671,10 @@ void Access::initBroadcasterAndChanges(
//TODO: non-void Element, ReplacedElement
}
if (collectPropChanges) {
- propChanges.push_back(
- css::beans::PropertyChangeEvent(
+ propChanges.emplace_back(
static_cast< cppu::OWeakObject * >(this),
i.first, false, -1, css::uno::Any(),
- css::uno::Any()));
+ css::uno::Any());
}
}
}
@@ -1759,11 +1757,10 @@ void Access::initBroadcasterAndChanges(
//TODO: non-void ReplacedElement
}
if (collectPropChanges) {
- propChanges.push_back(
- css::beans::PropertyChangeEvent(
+ propChanges.emplace_back(
static_cast< cppu::OWeakObject * >(this),
i.first, false, -1, css::uno::Any(),
- css::uno::Any()));
+ css::uno::Any());
}
}
break;
@@ -1895,11 +1892,10 @@ void Access::initBroadcasterAndChanges(
//TODO: non-void ReplacedElement
}
if (collectPropChanges) {
- propChanges.push_back(
- css::beans::PropertyChangeEvent(
+ propChanges.emplace_back(
static_cast< cppu::OWeakObject * >(this),
i.first, false, -1, css::uno::Any(),
- css::uno::Any()));
+ css::uno::Any());
}
}
break;
diff --git a/configmgr/source/broadcaster.cxx b/configmgr/source/broadcaster.cxx
index 87481cc28749..06e502ade75b 100644
--- a/configmgr/source/broadcaster.cxx
+++ b/configmgr/source/broadcaster.cxx
@@ -57,39 +57,35 @@ void Broadcaster::addDisposeNotification(
css::uno::Reference< css::lang::XEventListener > const & listener,
css::lang::EventObject const & event)
{
- disposeNotifications_.push_back(DisposeNotification(listener, event));
+ disposeNotifications_.emplace_back(listener, event);
}
void Broadcaster::addContainerElementReplacedNotification(
css::uno::Reference< css::container::XContainerListener > const & listener,
css::container::ContainerEvent const & event)
{
- containerElementReplacedNotifications_.push_back(
- ContainerNotification(listener, event));
+ containerElementReplacedNotifications_.emplace_back(listener, event);
}
void Broadcaster::addContainerElementInsertedNotification(
css::uno::Reference< css::container::XContainerListener > const & listener,
css::container::ContainerEvent const & event)
{
- containerElementInsertedNotifications_.push_back(
- ContainerNotification(listener, event));
+ containerElementInsertedNotifications_.emplace_back(listener, event);
}
void Broadcaster::addContainerElementRemovedNotification(
css::uno::Reference< css::container::XContainerListener > const & listener,
css::container::ContainerEvent const & event)
{
- containerElementRemovedNotifications_.push_back(
- ContainerNotification(listener, event));
+ containerElementRemovedNotifications_.emplace_back(listener, event);
}
void Broadcaster::addPropertyChangeNotification(
css::uno::Reference< css::beans::XPropertyChangeListener > const & listener,
css::beans::PropertyChangeEvent const & event)
{
- propertyChangeNotifications_.push_back(
- PropertyChangeNotification(listener, event));
+ propertyChangeNotifications_.emplace_back(listener, event);
}
void Broadcaster::addPropertiesChangeNotification(
@@ -97,15 +93,14 @@ void Broadcaster::addPropertiesChangeNotification(
listener,
css::uno::Sequence< css::beans::PropertyChangeEvent > const & event)
{
- propertiesChangeNotifications_.push_back(
- PropertiesChangeNotification(listener, event));
+ propertiesChangeNotifications_.emplace_back(listener, event);
}
void Broadcaster::addChangesNotification(
css::uno::Reference< css::util::XChangesListener > const & listener,
css::util::ChangesEvent const & event)
{
- changesNotifications_.push_back(ChangesNotification(listener, event));
+ changesNotifications_.emplace_back(listener, event);
}
void Broadcaster::send() {
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index af4a2396e285..19516773173a 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -792,7 +792,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
if (manager->parse(nullptr)) {
processedDeps.insert(name);
} else {
- unres.push_back(UnresolvedListItem(name, manager));
+ unres.emplace_back(name, manager);
}
}
}