diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-08-11 20:31:51 -0400 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-08-13 05:34:33 +0000 |
commit | 3babca3e849e1cb42225ca1c26e8f6156ad153e6 (patch) | |
tree | 9ceea495b6261e8f589f3432183a2f3553b4d827 /include/basebmp | |
parent | ca6c2bab8771a209fde937599bf9cecea2b77104 (diff) |
tdf#92459 basebmp: replace project2nd
Replace the use of project2nd in basebmp with a specialized functor
similar to what is seen in paletteformats.hxx and
pixelformatadapters.hxx. There should be no side effects due to this
change.
Change-Id: I1bbd723931e41986542e92bac773bbea68cfe5bd
Reviewed-on: https://gerrit.libreoffice.org/17660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'include/basebmp')
-rw-r--r-- | include/basebmp/accessortraits.hxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/basebmp/accessortraits.hxx b/include/basebmp/accessortraits.hxx index eeabae077f6b..d09f80559641 100644 --- a/include/basebmp/accessortraits.hxx +++ b/include/basebmp/accessortraits.hxx @@ -24,8 +24,6 @@ #include <basebmp/accessoradapters.hxx> #include <basebmp/metafunctions.hxx> -#include <o3tl/compat_functional.hxx> - #include <functional> namespace basebmp @@ -71,7 +69,15 @@ template< class Accessor, type; }; - +/// given an Accessor and its value type return its value_type +template< typename Accessor > struct ColorPassThrough +{ + typename Accessor::value_type operator()( const Accessor&, + const typename Accessor::value_type& x ) const + { + return x; + } +}; /** Traits template for Accessor @@ -84,7 +90,7 @@ template< class Accessor > struct AccessorTraits typedef typename Accessor::value_type value_type; /// Retrieve stand-alone color lookup function for given Accessor type - typedef o3tl::project2nd< Accessor, value_type > color_lookup; + typedef ColorPassThrough< Accessor > color_lookup; /// Retrieve raw pixel data accessor for given Accessor type typedef Accessor raw_accessor; |