diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-06-27 00:54:32 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 08:38:50 +0200 |
commit | 38b14b248029ea65fc778ede06e8b426b74451da (patch) | |
tree | 798f9e4b1789b4cacc147ef5f66507047d028b54 /desktop | |
parent | f1d9aca4bf596c0a3be44483b1d60867f12683ec (diff) |
tdf#96099 Remove some trivial std::deque typedefs
Change-Id: I101c8a39344ab007640aec9ddad6f82d4fe64296
Reviewed-on: https://gerrit.libreoffice.org/56504
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 24 | ||||
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 23 |
2 files changed, 21 insertions, 26 deletions
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 37c5d77b79aa..40ccfd8f6bef 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -62,8 +62,6 @@ namespace backend { namespace component { namespace { -typedef std::deque<OUString> t_stringlist; - #define IMPLEMENTATION_NAME "com.sun.star.comp.deployment.component.PackageRegistryBackend" /** return a vector of bootstrap variables which have been provided @@ -241,13 +239,13 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend }; friend class OtherPlatformPackageImpl; - t_stringlist m_jar_typelibs; - t_stringlist m_rdb_typelibs; - t_stringlist m_components; + std::deque<OUString> m_jar_typelibs; + std::deque<OUString> m_rdb_typelibs; + std::deque<OUString> m_components; enum RcItem { RCITEM_JAR_TYPELIB, RCITEM_RDB_TYPELIB, RCITEM_COMPONENTS }; - t_stringlist & getRcItemList( RcItem kind ) { + std::deque<OUString> & getRcItemList( RcItem kind ) { switch (kind) { case RCITEM_JAR_TYPELIB: @@ -862,8 +860,8 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) if (! m_jar_typelibs.empty()) { - t_stringlist::const_iterator iPos( m_jar_typelibs.begin() ); - t_stringlist::const_iterator const iEnd( m_jar_typelibs.end() ); + auto iPos( m_jar_typelibs.cbegin() ); + auto const iEnd( m_jar_typelibs.cend() ); buf.append( "UNO_JAVA_CLASSPATH=" ); while (iPos != iEnd) { // encoded ASCII file-urls: @@ -878,8 +876,8 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) } if (! m_rdb_typelibs.empty()) { - t_stringlist::const_iterator iPos( m_rdb_typelibs.begin() ); - t_stringlist::const_iterator const iEnd( m_rdb_typelibs.end() ); + auto iPos( m_rdb_typelibs.cbegin() ); + auto const iEnd( m_rdb_typelibs.cend() ); buf.append( "UNO_TYPES=" ); while (iPos != iEnd) { buf.append( '?' ); @@ -972,7 +970,7 @@ void BackendImpl::addToUnoRc( RcItem kind, OUString const & url_, const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); unorc_verify_init( xCmdEnv ); - t_stringlist & rSet = getRcItemList(kind); + std::deque<OUString> & rSet = getRcItemList(kind); if (std::find( rSet.begin(), rSet.end(), rcterm ) == rSet.end()) { rSet.push_front( rcterm ); // prepend to list, thus overriding // write immediately: @@ -989,7 +987,7 @@ void BackendImpl::removeFromUnoRc( const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); unorc_verify_init( xCmdEnv ); - t_stringlist & aRcItemList = getRcItemList(kind); + std::deque<OUString> & aRcItemList = getRcItemList(kind); aRcItemList.erase(std::remove(aRcItemList.begin(), aRcItemList.end(), rcterm), aRcItemList.end()); // write immediately: m_unorc_modified = true; @@ -1002,7 +1000,7 @@ bool BackendImpl::hasInUnoRc( { const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); - t_stringlist const & rSet = getRcItemList(kind); + std::deque<OUString> const & rSet = getRcItemList(kind); return std::find( rSet.begin(), rSet.end(), rcterm ) != rSet.end(); } diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index dc83fe547ba7..b9b8645dfc44 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -61,9 +61,6 @@ namespace backend { namespace configuration { namespace { -typedef std::deque<OUString> t_stringlist; - - class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend { class PackageImpl : public ::dp_registry::backend::Package @@ -97,9 +94,9 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend }; friend class PackageImpl; - t_stringlist m_xcs_files; - t_stringlist m_xcu_files; - t_stringlist & getFiles( bool xcs ) { + std::deque<OUString> m_xcs_files; + std::deque<OUString> m_xcu_files; + std::deque<OUString> & getFiles( bool xcs ) { return xcs ? m_xcs_files : m_xcu_files; } @@ -422,8 +419,8 @@ void BackendImpl::configmgrini_flush( OStringBuffer buf; if (! m_xcs_files.empty()) { - t_stringlist::const_iterator iPos( m_xcs_files.begin() ); - t_stringlist::const_iterator const iEnd( m_xcs_files.end() ); + auto iPos( m_xcs_files.cbegin() ); + auto const iEnd( m_xcs_files.cend() ); buf.append( "SCHEMA=" ); while (iPos != iEnd) { // encoded ASCII file-urls: @@ -438,8 +435,8 @@ void BackendImpl::configmgrini_flush( } if (! m_xcu_files.empty()) { - t_stringlist::const_iterator iPos( m_xcu_files.begin() ); - t_stringlist::const_iterator const iEnd( m_xcu_files.end() ); + auto iPos( m_xcu_files.cbegin() ); + auto const iEnd( m_xcu_files.cend() ); buf.append( "DATA=" ); while (iPos != iEnd) { // encoded ASCII file-urls: @@ -472,7 +469,7 @@ void BackendImpl::addToConfigmgrIni( bool isSchema, bool isURL, OUString const & const OUString rcterm( isURL ? dp_misc::makeRcTerm(url_) : url_ ); const ::osl::MutexGuard guard( getMutex() ); configmgrini_verify_init( xCmdEnv ); - t_stringlist & rSet = getFiles(isSchema); + std::deque<OUString> & rSet = getFiles(isSchema); if (std::find( rSet.begin(), rSet.end(), rcterm ) == rSet.end()) { rSet.push_front( rcterm ); // prepend to list, thus overriding // write immediately: @@ -489,8 +486,8 @@ bool BackendImpl::removeFromConfigmgrIni( const OUString rcterm( dp_misc::makeRcTerm(url_) ); const ::osl::MutexGuard guard( getMutex() ); configmgrini_verify_init( xCmdEnv ); - t_stringlist & rSet = getFiles(isSchema); - t_stringlist::iterator i(std::find(rSet.begin(), rSet.end(), rcterm)); + std::deque<OUString> & rSet = getFiles(isSchema); + auto i(std::find(rSet.begin(), rSet.end(), rcterm)); if (i == rSet.end() && !isSchema) { //in case the xcu contained %origin% then the configmr.ini contains the |