diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-30 08:49:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-30 10:38:23 +0200 |
commit | d051dd8dab68b4dd109e1f5f89f6b96fdc6152fc (patch) | |
tree | 5cdce1f8ffc9619f58a288cfb356d6f55e8cc99d /pyuno | |
parent | 610050fcd745694a6dee58152bfc1c4d85535165 (diff) |
loplugin:noexceptmove in pyuno
needed to make scratch() and get() noexcept
Change-Id: I7d50405698557eb9794adc6523d4878675903db2
Reviewed-on: https://gerrit.libreoffice.org/78284
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/inc/pyuno.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pyuno/inc/pyuno.hxx b/pyuno/inc/pyuno.hxx index 1d1fa7750879..39f5a0ed128f 100644 --- a/pyuno/inc/pyuno.hxx +++ b/pyuno/inc/pyuno.hxx @@ -98,11 +98,11 @@ public: } PyRef(const PyRef &r) : m(r.get()) { Py_XINCREF(m); } - PyRef(PyRef &&r) : m(r.get()) { r.scratch(); } + PyRef(PyRef &&r) noexcept : m(r.get()) { r.scratch(); } ~PyRef() { Py_XDECREF( m ); } - PyObject *get() const { return m; } + PyObject *get() const noexcept { return m; } PyObject * getAcquired() const { @@ -134,7 +134,7 @@ public: /** clears the reference without decreasing the reference count only seldom needed ! */ - void scratch() + void scratch() noexcept { m = nullptr; } |