[Libreoffice-commits] .: slideshow/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Thu Sep 29 08:11:24 PDT 2011
slideshow/source/inc/tools.hxx | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
New commits:
commit 10f996efb1ab913101e1a635f6cda8087758568e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 29 17:11:14 2011 +0200
fix trunk gcc compiler errors; second attempt for the previously reverted part
diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx
index 0293fb8..0aaafe5 100644
--- a/slideshow/source/inc/tools.hxx
+++ b/slideshow/source/inc/tools.hxx
@@ -76,6 +76,14 @@ namespace slideshow
typedef ::boost::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr;
+ template <typename T>
+ inline ::std::size_t hash_value( T * const& p )
+ {
+ ::std::size_t d = static_cast< ::std::size_t >(
+ reinterpret_cast< ::std::ptrdiff_t >(p) );
+ return d + (d >> 3);
+ }
+
// xxx todo: remove with boost::hash when 1.33 is available
template <typename T>
struct hash : ::std::unary_function<T, ::std::size_t>
@@ -84,16 +92,11 @@ namespace slideshow
return hash_value(val);
}
};
- template <typename T>
- inline ::std::size_t hash_value( T * const& p )
- {
- ::std::size_t d = static_cast< ::std::size_t >(
- reinterpret_cast< ::std::ptrdiff_t >(p) );
- return d + (d >> 3);
- }
+ }
+}
+
+namespace com { namespace sun { namespace star { namespace uno {
- // xxx todo: shift to namespace com::sun::star::uno when
- // 1.33 is available
template <typename T>
inline ::std::size_t hash_value(
::com::sun::star::uno::Reference<T> const& x )
@@ -103,9 +106,15 @@ namespace slideshow
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface> const xRoot(
x, ::com::sun::star::uno::UNO_QUERY );
- return hash<void *>()(xRoot.get());
+ return slideshow::internal::hash<void *>()(xRoot.get());
}
+} } } }
+
+namespace slideshow
+{
+ namespace internal
+ {
/** Cycle mode of intrinsic animations
*/
enum CycleMode
More information about the Libreoffice-commits
mailing list