Author: hdu
Date: Fri May 17 16:11:31 2013
New Revision: 1483895
URL: http://svn.apache.org/r1483895
Log:
#i122208# remove the need to emulate std::iota()
rewriting the two existing snippets not only removes the
need to emulate std::iota() but also makes the code cleaner
and more debuggable
Removed:
openoffice/branches/rejuvenate01/main/stlport/systemstl/numeric
Modified:
openoffice/branches/rejuvenate01/main/canvas/source/vcl/impltools.cxx
openoffice/branches/rejuvenate01/main/sc/source/core/data/global.cxx
Modified: openoffice/branches/rejuvenate01/main/canvas/source/vcl/impltools.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/canvas/source/vcl/impltools.cxx?rev=1483895&r1=1483894&r2=1483895&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/canvas/source/vcl/impltools.cxx
(original)
+++ openoffice/branches/rejuvenate01/main/canvas/source/vcl/impltools.cxx Fri
May 17 16:11:31 2013
@@ -297,7 +297,9 @@ namespace vclcanvas
{
// source already has alpha channel - 1:1 mapping,
// i.e. aAlphaMap[0]=0,...,aAlphaMap[255]=255.
- ::std::iota( aAlphaMap, &aAlphaMap[256], 0 );
+ sal_uInt8* p = aAlphaMap;
+ for( int n = 0; n < 256; ++n, ++p )
+ *p = n;
}
else
{
Modified: openoffice/branches/rejuvenate01/main/sc/source/core/data/global.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sc/source/core/data/global.cxx?rev=1483895&r1=1483894&r2=1483895&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sc/source/core/data/global.cxx
(original)
+++ openoffice/branches/rejuvenate01/main/sc/source/core/data/global.cxx Fri
May 17 16:11:31 2013
@@ -1677,13 +1677,15 @@ xub_StrLen ScFuncDesc::getSuppressedArgu
//
void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>&
_rArguments) const
{
+ _rArguments.resize( nArgCount);
+
if (!bHasSuppressedArgs || !pDefArgFlags)
{
- _rArguments.resize( nArgCount);
- ::std::iota( _rArguments.begin(), _rArguments.end(), 0);
+ ::std::vector<sal_uInt16>::iterator it = _rArguments.begin();
+ for( sal_uInt16 n = 0; n < nArgCount; ++n, ++it )
+ *it = n;
}
- _rArguments.reserve( nArgCount);
sal_uInt16 nArgs = nArgCount;
if (nArgs >= PAIRED_VAR_ARGS)
nArgs -= PAIRED_VAR_ARGS - 2;