[Libreoffice-commits] .: dbaccess/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Nov 23 07:45:16 PST 2010
dbaccess/source/ui/browser/genericcontroller.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 5f0401a2ef24f286f5d2c7f8a96379328ebfe287
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 23 15:43:42 2010 +0000
make possible to build with c++0x
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 72247c9..4b3fd33 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -1571,6 +1571,16 @@ Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroup
return aCommandGroups;
}
+namespace
+{
+ //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; }
+ };
+}
+
// -----------------------------------------------------------------------------
Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (RuntimeException)
{
@@ -1592,7 +1602,7 @@ Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableD
::std::transform( aInformationList.begin(),
aInformationList.end(),
aInformation.getArray(),
- ::std::identity< DispatchInformation >()
+ SGI_identity< DispatchInformation >()
);
return aInformation;
More information about the Libreoffice-commits
mailing list