summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-02-08 11:28:22 +0100
committerThorsten Behrens <tbehrens@novell.com>2011-02-08 11:29:47 +0100
commit294c191f6f80e2c7e1e6ed17683c23c3d3b7e9e3 (patch)
treeda6bc373f44371ea29ffcae7d72df70645997e51 /basebmp
parent5e5abcdd6fcc2d87160baddc83c8c324ed211450 (diff)
Remove last remaining SGI-ism from basebmp
Get rid of std::project2nd, which is an SGI extension to STL. Permits build against compiler-provided stl, no need for stlport anymore.
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/inc/basebmp/accessortraits.hxx2
-rw-r--r--basebmp/inc/basebmp/metafunctions.hxx10
-rw-r--r--basebmp/inc/basebmp/paletteformats.hxx2
3 files changed, 11 insertions, 3 deletions
diff --git a/basebmp/inc/basebmp/accessortraits.hxx b/basebmp/inc/basebmp/accessortraits.hxx
index e54da3f3b5ea..30bdcd59c4ee 100644
--- a/basebmp/inc/basebmp/accessortraits.hxx
+++ b/basebmp/inc/basebmp/accessortraits.hxx
@@ -91,7 +91,7 @@ template< class Accessor > struct AccessorTraits
typedef typename Accessor::value_type value_type;
/// Retrieve stand-alone color lookup function for given Accessor type
- typedef std::project2nd< Accessor, value_type > color_lookup;
+ typedef project2nd< Accessor, value_type > color_lookup;
/// Retrieve raw pixel data accessor for given Accessor type
typedef Accessor raw_accessor;
diff --git a/basebmp/inc/basebmp/metafunctions.hxx b/basebmp/inc/basebmp/metafunctions.hxx
index 642a98a70680..5f9f8a7ebf31 100644
--- a/basebmp/inc/basebmp/metafunctions.hxx
+++ b/basebmp/inc/basebmp/metafunctions.hxx
@@ -33,6 +33,8 @@
#include <vigra/metaprogramming.hxx>
#include <vigra/numerictraits.hxx>
+#include <functional>
+
namespace basebmp
{
@@ -217,6 +219,14 @@ template< typename T > inline T shiftRight( T v, int shift )
return shift > 0 ? v >> shift : v << (-shift);
}
+//--------------------------------------------------------------
+
+/// Replace non-std project2nd from SGI extensions
+template< typename T1, typename T2 >
+struct project2nd : public std::binary_function<T1, T2, T2>
+{
+ T2 operator() (const T1&, const T2& v) const { return v; }
+};
} // namespace basebmp
diff --git a/basebmp/inc/basebmp/paletteformats.hxx b/basebmp/inc/basebmp/paletteformats.hxx
index f138549462fe..1cdfe30181d1 100644
--- a/basebmp/inc/basebmp/paletteformats.hxx
+++ b/basebmp/inc/basebmp/paletteformats.hxx
@@ -41,8 +41,6 @@
#include <vigra/numerictraits.hxx>
#include <vigra/metaprogramming.hxx>
-#include <functional>
-
namespace basebmp
{