[Libreoffice-commits] core.git: pyuno/inc

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 30 08:39:11 UTC 2019


 pyuno/inc/pyuno.hxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d051dd8dab68b4dd109e1f5f89f6b96fdc6152fc
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Aug 30 08:49:15 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 30 10:38:23 2019 +0200

    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 at collabora.co.uk>

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;
     }


More information about the Libreoffice-commits mailing list