You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/05/17 18:19:53 UTC

svn commit: r1483900 - /openoffice/branches/rejuvenate01/main/comphelper/inc/comphelper/namedvaluecollection.hxx

Author: hdu
Date: Fri May 17 16:19:53 2013
New Revision: 1483900

URL: http://svn.apache.org/r1483900
Log:
#i122208# WaE: avoid std::transform in namedvaluecollection.hxx

in some build environments the use of std::transform with plain pointers
as input iterators triggers warnings which could be suppressed e.g. on
MSVC with the SCL_SECURE_NO_WARNINGS define. But why bother with this
when the little rewrite is as clean and more debuggable.

Modified:
    openoffice/branches/rejuvenate01/main/comphelper/inc/comphelper/namedvaluecollection.hxx

Modified: openoffice/branches/rejuvenate01/main/comphelper/inc/comphelper/namedvaluecollection.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/comphelper/inc/comphelper/namedvaluecollection.hxx?rev=1483900&r1=1483899&r2=1483900&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/comphelper/inc/comphelper/namedvaluecollection.hxx (original)
+++ openoffice/branches/rejuvenate01/main/comphelper/inc/comphelper/namedvaluecollection.hxx Fri May 17 16:19:53 2013
@@ -353,12 +353,12 @@ namespace comphelper
             ::com::sun::star::uno::Sequence< VALUE_TYPE > aValues;
             *this >>= aValues;
             ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aWrappedValues( aValues.getLength() );
-            ::std::transform(
-                aValues.getConstArray(),
-                aValues.getConstArray() + aValues.getLength(),
-                aWrappedValues.getArray(),
-                ::com::sun::star::uno::makeAny< VALUE_TYPE >
-            );
+
+            ::com::sun::star::uno::Any* pO = aWrappedValues.getArray();
+            const VALUE_TYPE* pV = aValues.getConstArray();
+            const sal_Int32 nLen = aValues.getLength();
+            for( sal_Int32 i = 0; i < nLen; ++i )
+                *(pO++) = ::com::sun::star::uno::makeAny<VALUE_TYPE>( *(pV++) );
             return aWrappedValues;
         }
     };