From d763944d302a72e300b63ac9c5eb54f1ae2eef77 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 20 Feb 2017 19:43:40 +0100 Subject: loplugin:subtlezeroinit: pyuno Change-Id: Id36181c096cbd6f87288fda7f8d37996b538d9bf --- pyuno/source/module/pyuno.cxx | 2 +- pyuno/source/module/pyuno_iterator.cxx | 4 ++-- pyuno/source/module/pyuno_runtime.cxx | 2 +- pyuno/source/module/pyuno_struct.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index 0281f705a914..044eec321fbb 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1722,7 +1722,7 @@ PyRef PyUNO_new ( PyUNO* self = PyObject_New (PyUNO, &PyUNOType); if (self == nullptr) return PyRef(); // == error - self->members = new PyUNOInternals(); + self->members = new PyUNOInternals; self->members->xInvocation = xInvocation; self->members->wrappedObject = targetInterface; return PyRef( reinterpret_cast(self), SAL_NO_ACQUIRE ); diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 71ccb03ac6cd..5a36a32d516d 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -171,7 +171,7 @@ PyObject* PyUNO_iterator_new( const Reference< XEnumeration >& xEnumeration ) PyUNO_iterator* self = PyObject_New( PyUNO_iterator, &PyUNO_iterator_Type ); if ( self == nullptr ) return nullptr; // == error - self->members = new PyUNO_iterator_Internals(); + self->members = new PyUNO_iterator_Internals; self->members->xEnumeration = xEnumeration; return reinterpret_cast(self); } @@ -301,7 +301,7 @@ PyObject* PyUNO_list_iterator_new( const Reference &xIndexAccess ) PyUNO_list_iterator* self = PyObject_New( PyUNO_list_iterator, &PyUNO_list_iterator_Type ); if ( self == nullptr ) return nullptr; // == error - self->members = new PyUNO_list_iterator_Internals(); + self->members = new PyUNO_list_iterator_Internals; self->members->xIndexAccess = xIndexAccess; self->members->index = 0; return reinterpret_cast(self); diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 69e5a1732605..a51060db812f 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -257,7 +257,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx ) me->cargo = nullptr; // must use a different struct here, as the PyObject_New // makes C++ unusable - RuntimeCargo *c = new RuntimeCargo(); + RuntimeCargo *c = new RuntimeCargo; readLoggingConfig( &(c->logLevel) , &(c->logFile) ); log( c, LogLevel::CALL, "Instantiating pyuno bridge" ); diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx index be8e0b913807..e2d7acc6ec2a 100644 --- a/pyuno/source/module/pyuno_struct.cxx +++ b/pyuno/source/module/pyuno_struct.cxx @@ -376,7 +376,7 @@ PyRef PyUNOStruct_new ( PyUNO* self = PyObject_New (PyUNO, &PyUNOStructType); if (self == nullptr) return PyRef(); // == error - self->members = new PyUNOInternals(); + self->members = new PyUNOInternals; self->members->xInvocation = xInvocation; self->members->wrappedObject = targetInterface; return PyRef( reinterpret_cast(self), SAL_NO_ACQUIRE ); -- cgit