summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-09-29 17:11:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-09-29 17:11:14 +0200
commit10f996efb1ab913101e1a635f6cda8087758568e (patch)
treebde1ddb18897f7f7a1fbe75845c89a35e9a561f8 /slideshow
parent2cfcd347e2f44822199abde2a5666be22cf0c315 (diff)
fix trunk gcc compiler errors; second attempt for the previously reverted part
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/inc/tools.hxx29
1 files changed, 19 insertions, 10 deletions
diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx
index 0293fb8a9abe..0aaafe515012 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