diff options
author | Herbert Dürr <hdu@apache.org> | 2013-04-26 13:43:07 +0000 |
---|---|---|
committer | Herbert Dürr <hdu@apache.org> | 2013-04-26 13:43:07 +0000 |
commit | c191f2cb50688167d33566c509dc5101fa8bf05d (patch) | |
tree | 58b132deb0807245df53b464d12eb081df29aa24 /unotools/source/config | |
parent | 931f9852290ebb4671f66ef468b7db267ccd370d (diff) |
fix type-problem of pair (needed when move semantics are involved) and add a NotificationList type to simplify things
Notes
Notes:
prefer: 252e599b22f08a8138b78e4215c33a86f5889fef
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/inetoptions.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/unotools/source/config/inetoptions.cxx b/unotools/source/config/inetoptions.cxx index b7d3263a060c..03f337deaa59 100644 --- a/unotools/source/config/inetoptions.cxx +++ b/unotools/source/config/inetoptions.cxx @@ -207,13 +207,10 @@ void SvtInetOptions::Impl::notifyListeners( star::uno::Sequence< rtl::OUString > const & rKeys) { - typedef - std::vector< std::pair< star::uno::Reference< - star::beans::XPropertiesChangeListener >, - star::uno::Sequence< - star::beans::PropertyChangeEvent > > > - List; - List aNotifications; + typedef std::pair< star::uno::Reference< star::beans::XPropertiesChangeListener >, + star::uno::Sequence< star::beans::PropertyChangeEvent > > Listen2EventPair; + typedef std::vector< Listen2EventPair > NotificationList; + NotificationList aNotifications; { osl::MutexGuard aGuard(m_aMutex); aNotifications.reserve(m_aListeners.size()); @@ -240,16 +237,10 @@ SvtInetOptions::Impl::notifyListeners( } } if (nCount > 0) - { - aEvents.realloc(nCount); - aNotifications. - push_back(std::make_pair< List::value_type::first_type, - List::value_type::second_type >( - aIt->first, aEvents)); - } + aNotifications.push_back( Listen2EventPair( aIt->first, aEvents)); } } - for (List::size_type i = 0; i < aNotifications.size(); ++i) + for (NotificationList::size_type i = 0; i < aNotifications.size(); ++i) if (aNotifications[i].first.is()) aNotifications[i].first-> propertiesChange(aNotifications[i].second); |