[Libreoffice-commits] core.git: sfx2/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Apr 22 07:43:38 UTC 2016


 sfx2/source/view/classificationhelper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ec533b46ef174037e6cfadceb5fb38cbe805e2d2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Apr 22 08:39:37 2016 +0200

    SfxClassificationHelper: avoid implicit cast in loop
    
    const std::pair<OUString, OUString>&
    
    vs
    
    const std::pair<const OUString, OUString>&
    
    Avoid copying by just using 'const auto&'.
    
    Change-Id: I711edc13d20194ee4901d1afe1f48d1f49657a53
    Reviewed-on: https://gerrit.libreoffice.org/24291
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 5e4567a..5c581d5 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -392,7 +392,7 @@ void SfxClassificationHelper::Impl::pushToDocumentProperties()
     uno::Sequence<beans::Property> aProperties = xPropertySet->getPropertySetInfo()->getProperties();
     std::map<OUString, OUString> aLabels = m_aCategory.m_aLabels;
     aLabels[PROP_BACNAME()] = m_aCategory.m_aName;
-    for (const std::pair<OUString, OUString>& rLabel : aLabels)
+    for (const auto& rLabel : aLabels)
     {
         try
         {


More information about the Libreoffice-commits mailing list