summaryrefslogtreecommitdiff
path: root/include/osl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-29 10:35:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-30 08:12:07 +0200
commit6e4a2540d4d8ad9e141b87ac3d2123d1c96366ef (patch)
treec37720e7c9cb051f80aa1294b17b53e23b243187 /include/osl
parent0285492a45e9cc19c26e14dcdf297bcc491da4d2 (diff)
new loplugin:noexceptmove
idea from mike kaganski look for places where we can mark move operators as noexcept, which makes some STL operations more efficient Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f Reviewed-on: https://gerrit.libreoffice.org/78251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/osl')
-rw-r--r--include/osl/pipe.hxx4
-rw-r--r--include/osl/pipe_decl.hxx4
-rw-r--r--include/osl/socket.hxx4
-rw-r--r--include/osl/socket_decl.hxx4
4 files changed, 8 insertions, 8 deletions
diff --git a/include/osl/pipe.hxx b/include/osl/pipe.hxx
index e9cfe2e6c3f0..50022b7545c8 100644
--- a/include/osl/pipe.hxx
+++ b/include/osl/pipe.hxx
@@ -51,7 +51,7 @@ namespace osl
}
#if defined LIBO_INTERNAL_ONLY
- Pipe::Pipe(Pipe && other): m_handle(other.m_handle) {
+ Pipe::Pipe(Pipe && other) noexcept : m_handle(other.m_handle) {
other.m_handle = nullptr;
}
#endif
@@ -97,7 +97,7 @@ namespace osl
}
#if defined LIBO_INTERNAL_ONLY
- Pipe & Pipe::operator =(Pipe && other) {
+ Pipe & Pipe::operator =(Pipe && other) noexcept {
if (m_handle != nullptr) {
osl_releasePipe(m_handle);
}
diff --git a/include/osl/pipe_decl.hxx b/include/osl/pipe_decl.hxx
index 146b77a5624e..57f2c76b1c7c 100644
--- a/include/osl/pipe_decl.hxx
+++ b/include/osl/pipe_decl.hxx
@@ -59,7 +59,7 @@ public:
inline Pipe(const Pipe& pipe);
#if defined LIBO_INTERNAL_ONLY
- inline Pipe(Pipe && other);
+ inline Pipe(Pipe && other) noexcept;
#endif
/** Constructs a Pipe reference without acquiring the handle
@@ -108,7 +108,7 @@ public:
inline Pipe& SAL_CALL operator= (const Pipe& pipe);
#if defined LIBO_INTERNAL_ONLY
- inline Pipe & operator =(Pipe && other);
+ inline Pipe & operator =(Pipe && other) noexcept;
#endif
/** Assignment operator. If pipe was already created, the old one will
diff --git a/include/osl/socket.hxx b/include/osl/socket.hxx
index 0227095df089..640880144177 100644
--- a/include/osl/socket.hxx
+++ b/include/osl/socket.hxx
@@ -35,7 +35,7 @@ namespace osl
}
#if defined LIBO_INTERNAL_ONLY
- SocketAddr::SocketAddr(SocketAddr && other): m_handle(other.m_handle) {
+ SocketAddr::SocketAddr(SocketAddr && other) noexcept : m_handle(other.m_handle) {
other.m_handle = nullptr;
}
#endif
@@ -141,7 +141,7 @@ namespace osl
}
#if defined LIBO_INTERNAL_ONLY
- SocketAddr & SocketAddr::operator =(SocketAddr && other) {
+ SocketAddr & SocketAddr::operator =(SocketAddr && other) noexcept {
if (m_handle != nullptr) {
osl_destroySocketAddr(m_handle);
}
diff --git a/include/osl/socket_decl.hxx b/include/osl/socket_decl.hxx
index 3d2a05634348..25916897d0f9 100644
--- a/include/osl/socket_decl.hxx
+++ b/include/osl/socket_decl.hxx
@@ -51,7 +51,7 @@ namespace osl
inline SocketAddr(const SocketAddr& Addr);
#if defined LIBO_INTERNAL_ONLY
- inline SocketAddr(SocketAddr && other);
+ inline SocketAddr(SocketAddr && other) noexcept;
#endif
/** The SocketAddr takes over the responsibility of the handle (which means
@@ -141,7 +141,7 @@ namespace osl
inline SocketAddr & SAL_CALL operator= (const SocketAddr& Addr);
#if defined LIBO_INTERNAL_ONLY
- inline SocketAddr & operator =(SocketAddr && other);
+ inline SocketAddr & operator =(SocketAddr && other) noexcept;
#endif
/** Assigns the socket addr without copyconstructing it.