From 5437eb15ad3975b11c6eefe77dfd6687e0e73f81 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Thu, 28 Jun 2018 23:32:05 +0300 Subject: tdf#96099 Remove trivial std::map typedefs in [cd]* Change-Id: I043d265d3d73a3e16f05d5ca7e29a09341651d82 Reviewed-on: https://gerrit.libreoffice.org/56639 Tested-by: Jenkins Reviewed-by: Noel Grandin --- codemaker/source/javamaker/javatype.cxx | 60 ++++++++++++++++----------------- 1 file changed, 29 insertions(+), 31 deletions(-) (limited to 'codemaker') diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 71f4faa16117..5530392b278b 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -94,8 +94,6 @@ OUString createUnoName( return buf.makeStringAndClear(); } -typedef std::set< OUString > Dependencies; - enum SpecialType { SPECIAL_TYPE_NONE, SPECIAL_TYPE_ANY, @@ -128,7 +126,7 @@ struct PolymorphicUnoType { SpecialType translateUnoTypeToDescriptor( rtl::Reference< TypeManager > const & manager, OUString const & type, - bool array, bool classType, Dependencies * dependencies, + bool array, bool classType, std::set * dependencies, OStringBuffer * descriptor, OStringBuffer * signature, bool * needsSignature, PolymorphicUnoType * polymorphicUnoType); @@ -136,7 +134,7 @@ SpecialType translateUnoTypeToDescriptor( rtl::Reference< TypeManager > const & manager, codemaker::UnoType::Sort sort, OUString const & nucleus, sal_Int32 rank, std::vector< OUString > const & arguments, bool array, bool classType, - Dependencies * dependencies, OStringBuffer * descriptor, + std::set * dependencies, OStringBuffer * descriptor, OStringBuffer * signature, bool * needsSignature, PolymorphicUnoType * polymorphicUnoType) { @@ -274,7 +272,7 @@ SpecialType translateUnoTypeToDescriptor( SpecialType translateUnoTypeToDescriptor( rtl::Reference< TypeManager > const & manager, OUString const & type, - bool array, bool classType, Dependencies * dependencies, + bool array, bool classType, std::set * dependencies, OStringBuffer * descriptor, OStringBuffer * signature, bool * needsSignature, PolymorphicUnoType * polymorphicUnoType) { @@ -290,7 +288,7 @@ SpecialType translateUnoTypeToDescriptor( } SpecialType getFieldDescriptor( - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies, + rtl::Reference< TypeManager > const & manager, std::set * dependencies, OUString const & type, OString * descriptor, OString * signature, PolymorphicUnoType * polymorphicUnoType) { @@ -316,7 +314,7 @@ class MethodDescriptor { public: MethodDescriptor( rtl::Reference< TypeManager > const & manager, - Dependencies * dependencies, OUString const & returnType, + std::set * dependencies, OUString const & returnType, SpecialType * specialReturnType, PolymorphicUnoType * polymorphicUnoType); @@ -332,7 +330,7 @@ public: private: rtl::Reference< TypeManager > m_manager; - Dependencies * m_dependencies; + std::set * m_dependencies; OStringBuffer m_descriptorStart; OString m_descriptorEnd; OStringBuffer m_signatureStart; @@ -341,7 +339,7 @@ private: }; MethodDescriptor::MethodDescriptor( - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies, + rtl::Reference< TypeManager > const & manager, std::set * dependencies, OUString const & returnType, SpecialType * specialReturnType, PolymorphicUnoType * polymorphicUnoType): m_manager(manager), m_dependencies(dependencies), m_needsSignature(false) @@ -412,11 +410,11 @@ public: bool inParameter, bool outParameter, OString const & methodName, sal_Int32 index, PolymorphicUnoType const & polymorphicUnoType); - sal_uInt16 generateCode(ClassFile::Code & code, Dependencies * dependencies) + sal_uInt16 generateCode(ClassFile::Code & code, std::set * dependencies) const; void generatePolymorphicUnoTypeCode( - ClassFile::Code & code, Dependencies * dependencies) const; + ClassFile::Code & code, std::set * dependencies) const; private: Kind m_kind; @@ -480,7 +478,7 @@ TypeInfo::TypeInfo( {} sal_uInt16 TypeInfo::generateCode( - ClassFile::Code & code, Dependencies * dependencies) const + ClassFile::Code & code, std::set * dependencies) const { switch (m_kind) { case KIND_MEMBER: @@ -572,7 +570,7 @@ sal_uInt16 TypeInfo::generateCode( } void TypeInfo::generatePolymorphicUnoTypeCode( - ClassFile::Code & code, Dependencies * dependencies) const + ClassFile::Code & code, std::set * dependencies) const { assert(dependencies != nullptr); assert(m_polymorphicUnoType.kind != PolymorphicUnoType::KIND_NONE); @@ -639,7 +637,7 @@ void writeClassFile( void addTypeInfo( OString const & className, std::vector< TypeInfo > const & typeInfo, - Dependencies * dependencies, ClassFile * classFile) + std::set * dependencies, ClassFile * classFile) { assert(classFile != nullptr); std::vector< TypeInfo >::size_type typeInfos = typeInfo.size(); @@ -820,7 +818,7 @@ void handleEnumType( } void addField( - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies, + rtl::Reference< TypeManager > const & manager, std::set * dependencies, ClassFile * classFile, std::vector< TypeInfo > * typeInfo, sal_Int32 typeParameterIndex, OUString const & type, OUString const & name, sal_Int32 index) @@ -853,7 +851,7 @@ void addField( sal_uInt16 addFieldInit( rtl::Reference< TypeManager > const & manager, OString const & className, OUString const & fieldName, bool typeParameter, OUString const & fieldType, - Dependencies * dependencies, ClassFile::Code * code) + std::set * dependencies, ClassFile::Code * code) { assert(manager.is()); assert(code != nullptr); @@ -973,7 +971,7 @@ sal_uInt16 addFieldInit( sal_uInt16 addLoadLocal( rtl::Reference< TypeManager > const & manager, ClassFile::Code * code, sal_uInt16 * index, bool typeParameter, OUString const & type, bool any, - Dependencies * dependencies) + std::set * dependencies) { assert(manager.is()); assert(code != nullptr); @@ -1314,7 +1312,7 @@ sal_uInt16 addLoadLocal( } sal_uInt16 addDirectArgument( - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies, + rtl::Reference< TypeManager > const & manager, std::set * dependencies, MethodDescriptor * methodDescriptor, ClassFile::Code * code, sal_uInt16 * index, OString const & className, OString const & fieldName, bool typeParameter, OUString const & fieldType) @@ -1337,7 +1335,7 @@ sal_uInt16 addDirectArgument( } void addPlainStructBaseArguments( - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies, + rtl::Reference< TypeManager > const & manager, std::set * dependencies, MethodDescriptor * methodDescriptor, ClassFile::Code * code, OUString const & base, sal_uInt16 * index) { @@ -1369,7 +1367,7 @@ void handlePlainStructType( const OUString& name, rtl::Reference< unoidl::PlainStructTypeEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); assert(dependencies != nullptr); @@ -1445,7 +1443,7 @@ void handlePolyStructType( rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); OString className(codemaker::convertString(name).replace('.', '/')); @@ -1527,7 +1525,7 @@ void handlePolyStructType( } void addExceptionBaseArguments( - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies, + rtl::Reference< TypeManager > const & manager, std::set * dependencies, MethodDescriptor * methodDescriptor, ClassFile::Code * code, OUString const & base, sal_uInt16 * index) { @@ -1563,7 +1561,7 @@ void addExceptionBaseArguments( void handleExceptionType( const OUString& name, rtl::Reference< unoidl::ExceptionTypeEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); assert(dependencies != nullptr); @@ -1835,7 +1833,7 @@ void handleExceptionType( void createExceptionsAttribute( rtl::Reference< TypeManager > const & manager, std::vector< OUString > const & exceptionTypes, - Dependencies * dependencies, std::vector< OString > * exceptions, + std::set * dependencies, std::vector< OString > * exceptions, codemaker::ExceptionTree * tree) { assert(dependencies != nullptr); @@ -1854,7 +1852,7 @@ void createExceptionsAttribute( void handleInterfaceType( const OUString& name, rtl::Reference< unoidl::InterfaceTypeEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); assert(dependencies != nullptr); @@ -1961,7 +1959,7 @@ void handleInterfaceType( void handleTypedef( rtl::Reference< unoidl::TypedefEntity > const & entity, - rtl::Reference< TypeManager > const & manager, Dependencies * dependencies) + rtl::Reference< TypeManager > const & manager, std::set * dependencies) { assert(entity.is()); assert(manager.is()); @@ -1998,7 +1996,7 @@ void handleTypedef( void handleConstantGroup( const OUString& name, rtl::Reference< unoidl::ConstantGroupEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); OString className(codemaker::convertString(name).replace('.', '/')); @@ -2090,7 +2088,7 @@ void addConstructor( OString const & realJavaBaseName, OString const & unoName, OString const & className, unoidl::SingleInterfaceBasedServiceEntity::Constructor const & constructor, - OUString const & returnType, Dependencies * dependencies, + OUString const & returnType, std::set * dependencies, ClassFile * classFile) { assert(dependencies != nullptr); @@ -2240,7 +2238,7 @@ void handleService( const OUString& name, rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); assert(dependencies != nullptr); @@ -2333,7 +2331,7 @@ void handleSingleton( const OUString& name, rtl::Reference< unoidl::InterfaceBasedSingletonEntity > const & entity, rtl::Reference< TypeManager > const & manager, JavaOptions const & options, - Dependencies * dependencies) + std::set * dependencies) { assert(entity.is()); assert(dependencies != nullptr); @@ -2458,7 +2456,7 @@ void produce( if (!manager->foundAtPrimaryProvider(name)) { return; } - Dependencies deps; + std::set deps; rtl::Reference< unoidl::Entity > ent; rtl::Reference< unoidl::MapCursor > cur; switch (manager->getSort(name, &ent, &cur)) { -- cgit