Improved loplugin:redundantcast, static_cast on arithmetic types: binaryurp
Change-Id: I109c8a2c51c7916ce8f8964b57ee45747868844f
This commit is contained in:
@@ -145,8 +145,7 @@ css::uno::TypeDescription Unmarshal::readType() {
|
|||||||
"binaryurp::Unmarshal: cache flag of simple type is set");
|
"binaryurp::Unmarshal: cache flag of simple type is set");
|
||||||
}
|
}
|
||||||
return css::uno::TypeDescription(
|
return css::uno::TypeDescription(
|
||||||
*typelib_static_type_getByTypeClass(
|
*typelib_static_type_getByTypeClass(tc));
|
||||||
static_cast< typelib_TypeClass >(tc)));
|
|
||||||
case typelib_TypeClass_SEQUENCE:
|
case typelib_TypeClass_SEQUENCE:
|
||||||
case typelib_TypeClass_ENUM:
|
case typelib_TypeClass_ENUM:
|
||||||
case typelib_TypeClass_STRUCT:
|
case typelib_TypeClass_STRUCT:
|
||||||
@@ -163,9 +162,7 @@ css::uno::TypeDescription Unmarshal::readType() {
|
|||||||
} else {
|
} else {
|
||||||
OUString const str(readString());
|
OUString const str(readString());
|
||||||
css::uno::TypeDescription t(str);
|
css::uno::TypeDescription t(str);
|
||||||
if (!t.is() ||
|
if (!t.is() || t.get()->eTypeClass != tc) {
|
||||||
t.get()->eTypeClass != static_cast< typelib_TypeClass >(tc))
|
|
||||||
{
|
|
||||||
|
|
||||||
throw css::io::IOException(
|
throw css::io::IOException(
|
||||||
"binaryurp::Unmarshal: type with unknown name: " + str);
|
"binaryurp::Unmarshal: type with unknown name: " + str);
|
||||||
|
Reference in New Issue
Block a user