summaryrefslogtreecommitdiff
path: root/pyuno/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-29 17:19:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-29 17:19:43 +0100
commit542174a24e00ab81430a4028f49222dddb3e284f (patch)
tree0b151902f48ec62b94d36c52e18a232f28633b10 /pyuno/source
parent34dda497cdf0b131381c5d728a89343455d9c7d8 (diff)
Rewrite some (trivial) assignments inside if/while conditions: pyuno
Change-Id: I01ce742c727c66577d747e441a3794c1743f24ce
Diffstat (limited to 'pyuno/source')
-rw-r--r--pyuno/source/module/pyuno.cxx3
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx3
2 files changed, 3 insertions, 3 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 8c53f7464a4f..e94309def148 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -1338,8 +1338,7 @@ int PyUNO_contains( PyObject *self, PyObject *pKey )
PyRef rIterator( PyUNO_iter( self ), SAL_NO_ACQUIRE );
if ( rIterator.is() )
{
- PyObject* pItem;
- while ( (pItem = PyIter_Next( rIterator.get() )) )
+ while ( PyObject* pItem = PyIter_Next( rIterator.get() ) )
{
PyRef rItem( pItem, SAL_NO_ACQUIRE );
if ( PyObject_RichCompareBool( pKey, rItem.get(), Py_EQ ) == 1 )
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 4dd532ff30c3..c4b5aa9a018c 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -630,8 +630,9 @@ bool Runtime::pyIterUnpack( PyObject *const pObj, Any &a ) const
{
PyRef rItem( pItem, SAL_NO_ACQUIRE );
items.push_back( pyObject2Any( rItem.get() ) );
+ pItem = PyIter_Next( pObj );
}
- while( (pItem = PyIter_Next( pObj )) );
+ while( pItem );
a <<= comphelper::containerToSequence(items);
return true;
}
/lo/core/commit/i18nutil?h=aoo/aw080&id=5ab1fb926e984780380665ae185646b603292a6e'>Startcenter: use SCREEN_4_3 as default paper for presentationsZolnai Tamás 2013-12-20typo fixesAndras Timar 2013-12-11Related: rhbz#1040291 Change language name from 'Oriya' to 'Odia'Caolán McNamara 2013-11-14-Werror,-Wshift-sign-overflowStephan Bergmann 2013-11-11convert OUString !compareToAscii to equalsAsciiNoel Grandin 2013-10-21Exempler->ExemplarCaolán McNamara 2013-10-21i18nutil: Add new enumeration values from ICU 52Thomas Arnhold 2013-09-07s/wiki.services.openoffice.org/wiki.openoffice.org/gAndras Timar 2013-08-11Mark as constTakeshi Abe 2013-08-09Mark as const/staticTakeshi Abe