summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorDaniel Sikeler <d.sikeler94@gmail.com>2014-09-12 06:17:03 +0000
committerStephan Bergmann <sbergman@redhat.com>2014-09-18 13:12:48 +0200
commit32d6415617b5815bb5d18719f6d2df74becc0997 (patch)
tree55c7b6d7c068bb6eee60aa0a7add60cc6595513b /ucb
parentd311d85a4d501a0bfef20e610169f20de896a167 (diff)
fdo#83512 Make use of OUStringHash and OStringHash
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyprovider.hxx20
-rw-r--r--ucb/source/ucp/package/pkgprovider.cxx20
-rw-r--r--ucb/source/ucp/webdav-neon/ContentProperties.hxx19
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.hxx19
4 files changed, 4 insertions, 74 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx
index 4f176f820e0c..7910309d42fd 100644
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx
@@ -63,29 +63,11 @@ struct ConfigProviderMapEntry
ConfigProviderMapEntry() : bTriedToGetRootReadAccess( false ) {}
};
-struct equalString
-{
- bool operator()(
- const OUString& rKey1, const OUString& rKey2 ) const
- {
- return !!( rKey1 == rKey2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
typedef boost::unordered_map
<
OUString, // servcie specifier
ConfigProviderMapEntry,
- hashString,
- equalString
+ OUStringHash
>
ConfigProviderMap;
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index 42ee7e789be6..cf3c35472c91 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -91,29 +91,11 @@ public:
-struct equalString
-{
- bool operator()(
- const OUString& rKey1, const OUString& rKey2 ) const
- {
- return !!( rKey1 == rKey2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
typedef boost::unordered_map
<
OUString,
Package*,
- hashString,
- equalString
+ OUStringHash
>
PackageMap;
diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.hxx b/ucb/source/ucp/webdav-neon/ContentProperties.hxx
index 73c228c7854a..07feceeae0ef 100644
--- a/ucb/source/ucp/webdav-neon/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav-neon/ContentProperties.hxx
@@ -48,22 +48,6 @@ struct DAVResource;
-struct equalString
-{
- bool operator()( const OUString& s1, const OUString& s2 ) const
- {
- return !!( s1 == s2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
// PropertyValueMap.
@@ -94,8 +78,7 @@ typedef boost::unordered_map
<
OUString,
PropertyValue,
- hashString,
- equalString
+ OUStringHash
>
PropertyValueMap;
diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx
index 0fa730468114..64e227f9fe18 100644
--- a/ucb/source/ucp/webdav/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav/ContentProperties.hxx
@@ -41,22 +41,6 @@ struct DAVResource;
-struct equalString
-{
- bool operator()( const OUString& s1, const OUString& s2 ) const
- {
- return !!( s1 == s2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
// PropertyValueMap.
@@ -87,8 +71,7 @@ typedef boost::unordered_map
<
OUString,
PropertyValue,
- hashString,
- equalString
+ OUStringHash
>
PropertyValueMap;