Kaydet (Commit) 9c1ff73b authored tarafından David Tardon's avatar David Tardon

use o3tl::project2nd

Change-Id: I636453e8cab09ec5021acd2bb1f2937f1402dccc
üst e449308e
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <basebmp/accessoradapters.hxx> #include <basebmp/accessoradapters.hxx>
#include <basebmp/metafunctions.hxx> #include <basebmp/metafunctions.hxx>
#include <o3tl/compat_functional.hxx>
#include <functional> #include <functional>
namespace basebmp namespace basebmp
...@@ -82,7 +84,7 @@ template< class Accessor > struct AccessorTraits ...@@ -82,7 +84,7 @@ template< class Accessor > struct AccessorTraits
typedef typename Accessor::value_type value_type; typedef typename Accessor::value_type value_type;
/// Retrieve stand-alone color lookup function for given Accessor type /// Retrieve stand-alone color lookup function for given Accessor type
typedef project2nd< Accessor, value_type > color_lookup; typedef o3tl::project2nd< Accessor, value_type > color_lookup;
/// Retrieve raw pixel data accessor for given Accessor type /// Retrieve raw pixel data accessor for given Accessor type
typedef Accessor raw_accessor; typedef Accessor raw_accessor;
......
...@@ -210,15 +210,6 @@ template< typename T > inline T shiftRight( T v, int shift ) ...@@ -210,15 +210,6 @@ template< typename T > inline T shiftRight( T v, int shift )
return shift > 0 ? v >> shift : v << (-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 } // namespace basebmp
#endif /* INCLUDED_BASEBMP_METAFUNCTIONS_HXX */ #endif /* INCLUDED_BASEBMP_METAFUNCTIONS_HXX */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment