diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:04:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:04:17 +0100 |
commit | f2b0eb086fcadec59fde957fe1717fecb537484b (patch) | |
tree | ef8facb30c6007dc6ca3d67b3dcdf3ad850a3ba5 /pyuno | |
parent | 6f58d7a12e4acaad59a00df345591ac5ce552cbe (diff) |
More loplugin:cstylecast: pyuno
Change-Id: I2d3e2104c63bdff1a18fd32c2db37a565e9380e2
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_except.cxx | 2 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 2 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 2 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_type.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx index 074fd7d1cebd..0d627dd2566e 100644 --- a/pyuno/source/module/pyuno_except.cxx +++ b/pyuno/source/module/pyuno_except.cxx @@ -91,7 +91,7 @@ static PyRef createClass( const OUString & name, const Runtime &runtime ) if( !isStruct && !isExc && ! isInterface ) { throw RuntimeException( "pyuno.getClass: " + name + "is a " + - OUString::createFromAscii( typeClassToString( (css::uno::TypeClass) desc.get()->eTypeClass) ) + + OUString::createFromAscii( typeClassToString( static_cast<css::uno::TypeClass>(desc.get()->eTypeClass)) ) + ", expected EXCEPTION, STRUCT or INTERFACE" ); } diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index e0d4f3e4d3a6..bd04097f01af 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -481,7 +481,7 @@ static PyObject *getTypeByName( { Runtime runtime; ret = PyUNO_Type_new( - name, (css::uno::TypeClass)typeDesc.get()->eTypeClass, runtime ); + name, static_cast<css::uno::TypeClass>(typeDesc.get()->eTypeClass), runtime ); } else { diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 0734f9174b45..559310220bde 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -542,7 +542,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const } default: { - throw RuntimeException( "Unknown UNO type class " + OUString::number((int)a.getValueTypeClass()) ); + throw RuntimeException( "Unknown UNO type class " + OUString::number(static_cast<int>(a.getValueTypeClass())) ); } } } diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx index 191db4c21b2b..c6fc1351436b 100644 --- a/pyuno/source/module/pyuno_type.cxx +++ b/pyuno/source/module/pyuno_type.cxx @@ -168,7 +168,7 @@ Any PyEnum2Enum( PyObject *obj ) if(desc.get()->eTypeClass != typelib_TypeClass_ENUM ) { throw RuntimeException( "pyuno.checkEnum: " + strTypeName + "is a " + - OUString::createFromAscii(typeClassToString( (css::uno::TypeClass) desc.get()->eTypeClass)) + + OUString::createFromAscii(typeClassToString( static_cast<css::uno::TypeClass>(desc.get()->eTypeClass))) + ", expected ENUM" ); } @@ -217,7 +217,7 @@ Type PyType2Type( PyObject * o ) if( static_cast<css::uno::TypeClass>(desc.get()->eTypeClass) != tc ) { throw RuntimeException( "pyuno.checkType: " + name + " is a " + - OUString::createFromAscii( typeClassToString( (TypeClass) desc.get()->eTypeClass) ) + + OUString::createFromAscii( typeClassToString( static_cast<TypeClass>(desc.get()->eTypeClass)) ) + ", but type got construct with typeclass " + OUString::createFromAscii( typeClassToString( tc ) ) ); } |