[Libreoffice-commits] .: slideshow/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Nov 23 07:50:56 PST 2010
slideshow/source/engine/animationfactory.cxx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 4261f37234ae0b36e54d87ff58a857f45e4b527b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 23 15:49:53 2010 +0000
make possible to build with c++0x
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx
index f5407ad..eefb344 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -592,6 +592,13 @@ namespace slideshow
bool mbAnimationStarted;
};
+ //Current c++0x draft (apparently) has std::identity, but not operator()
+ template<typename T> struct SGI_identity : public std::unary_function<T,T>
+ {
+ T& operator()(T& x) const { return x; }
+ const T& operator()(const T& x) const { return x; }
+ };
+
/** Function template wrapper around GenericAnimation template
@tpl AnimationBase
@@ -608,7 +615,7 @@ namespace slideshow
{
return ::boost::shared_ptr< AnimationBase >(
new GenericAnimation< AnimationBase,
- ::std::identity< typename AnimationBase::ValueType > >(
+ SGI_identity< typename AnimationBase::ValueType > >(
rShapeManager,
nFlags,
pIsValid,
@@ -616,8 +623,8 @@ namespace slideshow
pGetValue,
pSetValue,
// no modification necessary, use identity functor here
- ::std::identity< typename AnimationBase::ValueType >(),
- ::std::identity< typename AnimationBase::ValueType >() ) );
+ SGI_identity< typename AnimationBase::ValueType >(),
+ SGI_identity< typename AnimationBase::ValueType >() ) );
}
class Scaler
More information about the Libreoffice-commits
mailing list