summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2016-08-30 20:33:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-31 07:14:36 +0000
commit7173a4edab9a7c2e73d1caceb4422445a4d1c502 (patch)
treef2ae686aaf4075ddae22e2c2646a778174457729 /store
parent72eb18e520ea8165a6a20958a1551f55e5e14cab (diff)
store : Replace store::swap with std::swap
Change-Id: I85c1026502dc69b229aaf287858ae76f9391a34d Reviewed-on: https://gerrit.libreoffice.org/28506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'store')
-rw-r--r--store/source/storbase.hxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 3cc2bc54a6e7..c280e5d517e7 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -36,6 +36,7 @@
#include <stddef.h>
#include <string.h>
+#include <utility>
/*========================================================================
*
@@ -83,13 +84,6 @@ inline sal_uInt32 htonl (sal_uInt32 h) { return h; }
inline sal_uInt32 ntohl (sal_uInt32 n) { return n; }
#endif /* OSL_BIGENDIAN */
-/** swap.
- */
-template< typename T > void swap (T & lhs, T & rhs)
-{
- T tmp = lhs; lhs = rhs; rhs = tmp;
-}
-
/*========================================================================
*
* SharedCount.
@@ -139,7 +133,7 @@ public:
void swap (SharedCount & rhs) // nothrow
{
- store::swap(m_pCount, rhs.m_pCount);
+ std::swap(m_pCount, rhs.m_pCount);
}
SharedCount (SharedCount const & rhs) // nothrow
@@ -181,8 +175,8 @@ struct OStorePageGuard
void swap (OStorePageGuard & rhs)
{
- store::swap(m_nMagic, rhs.m_nMagic);
- store::swap(m_nCRC32, rhs.m_nCRC32);
+ std::swap(m_nMagic, rhs.m_nMagic);
+ std::swap(m_nCRC32, rhs.m_nCRC32);
}
OStorePageGuard (OStorePageGuard const & rhs)
@@ -234,9 +228,9 @@ struct OStorePageDescriptor
void swap (OStorePageDescriptor & rhs)
{
- store::swap(m_nAddr, rhs.m_nAddr);
- store::swap(m_nSize, rhs.m_nSize);
- store::swap(m_nUsed, rhs.m_nUsed);
+ std::swap(m_nAddr, rhs.m_nAddr);
+ std::swap(m_nSize, rhs.m_nSize);
+ std::swap(m_nUsed, rhs.m_nUsed);
}
OStorePageDescriptor (const OStorePageDescriptor & rhs)
@@ -330,7 +324,7 @@ struct OStorePageLink
void swap (OStorePageLink & rhs)
{
- store::swap(m_nAddr, rhs.m_nAddr);
+ std::swap(m_nAddr, rhs.m_nAddr);
}
OStorePageLink (const OStorePageLink & rhs)
@@ -552,8 +546,8 @@ public:
void swap (PageHolder & rhs) // nothrow
{
m_refcount.swap(rhs.m_refcount);
- store::swap(m_pagedata, rhs.m_pagedata);
- store::swap(m_allocator, rhs.m_allocator);
+ std::swap(m_pagedata, rhs.m_pagedata);
+ std::swap(m_allocator, rhs.m_allocator);
}
PageHolder (PageHolder const & rhs) // nothrow