diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-05 11:24:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-05 12:57:00 +0100 |
commit | 00aafa2e0140742983ec6e6e916636d23794dfe3 (patch) | |
tree | ad40e8ffca264c0736029da99261a6dbd718373e /pyuno | |
parent | 663aab4c2dd5d64d49b91a30cfa8f057729eae36 (diff) |
loplugin:reducevarscope in pyuno
Change-Id: I49157f373b0d5919492a0ba4ccdcd545c58730a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105333
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno.cxx | 4 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_iterator.cxx | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index 25aea6436032..25ae588d6d58 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1363,14 +1363,12 @@ static int PyUNO_contains( PyObject *self, PyObject *pKey ) static PyObject* PyUNO_getattr (PyObject* self, char* name) { - PyUNO* me; - try { Runtime runtime; - me = reinterpret_cast<PyUNO*>(self); + PyUNO* me = reinterpret_cast<PyUNO*>(self); if (strcmp (name, "__dict__") == 0) { Py_INCREF (Py_TYPE(me)->tp_dict); diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 840fc977014a..b5dcf78695a8 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -211,10 +211,10 @@ static PyObject* PyUNO_list_iterator_next( PyObject *self ) Runtime runtime; Any aRet; - bool noMoreElements = false; try { + bool noMoreElements = false; { PyThreadDetach antiguard; try { |