summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <thb@documentfoundation.org>2014-04-15 21:31:00 +0200
committerThorsten Behrens <thb@documentfoundation.org>2014-04-15 21:57:56 +0200
commit3764cfbc69815e5e74a689a5aeb07b0668ee861f (patch)
tree25b2543eb980929faa72b6a1301c00284ed3e7d6
parent0ae0301d1cd6e690473f932411ca880c20f45e13 (diff)
Remove iota template function & last call site.
Nice function, but with just one place using it in 9 years best coded verbatim at the call site... Change-Id: Ib306cf2311a39299cb007441c7cb1b0d81e67bce
-rw-r--r--canvas/source/vcl/impltools.cxx7
-rw-r--r--include/o3tl/compat_functional.hxx8
2 files changed, 5 insertions, 10 deletions
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index d46ac3247861..4a5091dcfbd6 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -48,7 +48,6 @@
#include <basegfx/numeric/ftools.hxx>
#include <canvas/canvastools.hxx>
-#include <o3tl/compat_functional.hxx>
#include "impltools.hxx"
#include "canvasbitmap.hxx"
@@ -281,7 +280,11 @@ namespace vclcanvas
{
// source already has alpha channel - 1:1 mapping,
// i.e. aAlphaMap[0]=0,...,aAlphaMap[255]=255.
- ::o3tl::iota( aAlphaMap, &aAlphaMap[256], 0 );
+ sal_uInt8 val=0;
+ sal_uInt8* pCur=aAlphaMap;
+ sal_uInt8* const pEnd=&aAlphaMap[256];
+ while(pCur != pEnd)
+ *pCur++ = val++;
}
else
{
diff --git a/include/o3tl/compat_functional.hxx b/include/o3tl/compat_functional.hxx
index 00ae33cb23bb..0484060bedb8 100644
--- a/include/o3tl/compat_functional.hxx
+++ b/include/o3tl/compat_functional.hxx
@@ -136,14 +136,6 @@ inline binary_compose<F1, F2, F3> compose2(const F1& fnction1, const F2& fnction
return (binary_compose<F1, F2, F3>(fnction1, fnction2, fnction3));
}
-/// Algo that assigns val, val+1, ... to the given range
-template<typename FwdIter, typename ValueType>
-inline void iota(FwdIter first, FwdIter last, ValueType val)
-{
- while(first != last)
- *first++ = val++;
-}
-
} // namespace o3tl
#endif