diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2001-04-11 06:29:27 +0000 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2001-04-11 06:29:27 +0000 |
commit | 3116185ab01a9ad2fed347f90a1f7c58aab3445d (patch) | |
tree | 67c89ecdb7bc3b7549977410aa33ae935736eeb2 | |
parent | 093e18e9e0356f69d8a9dcaa5caf2624f2c610ec (diff) |
performance optimization, stl iterators
-rw-r--r-- | codemaker/source/bonobowrappermaker/corbatype.cxx | 9 | ||||
-rw-r--r-- | codemaker/source/codemaker/typemanager.cxx | 12 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 9 | ||||
-rw-r--r-- | codemaker/source/idlmaker/idltype.cxx | 9 | ||||
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 9 | ||||
-rw-r--r-- | idlc/source/astarray.cxx | 6 | ||||
-rw-r--r-- | idlc/source/astdeclaration.cxx | 6 | ||||
-rw-r--r-- | idlc/source/astdump.cxx | 10 | ||||
-rw-r--r-- | idlc/source/astenum.cxx | 8 | ||||
-rw-r--r-- | idlc/source/astinterface.cxx | 7 | ||||
-rw-r--r-- | idlc/source/astoperation.cxx | 10 | ||||
-rw-r--r-- | idlc/source/astscope.cxx | 12 | ||||
-rw-r--r-- | idlc/source/aststruct.cxx | 6 | ||||
-rw-r--r-- | idlc/source/astunion.cxx | 20 | ||||
-rw-r--r-- | idlc/source/fehelper.cxx | 8 | ||||
-rw-r--r-- | idlc/source/idlcproduce.cxx | 6 |
16 files changed, 70 insertions, 77 deletions
diff --git a/codemaker/source/bonobowrappermaker/corbatype.cxx b/codemaker/source/bonobowrappermaker/corbatype.cxx index 749f3b2b6a25..1ee9611317f0 100644 --- a/codemaker/source/bonobowrappermaker/corbatype.cxx +++ b/codemaker/source/bonobowrappermaker/corbatype.cxx @@ -2,9 +2,9 @@ * * $RCSfile: corbatype.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: ts $ $Date: 2000-12-13 12:29:36 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:27:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -160,7 +160,7 @@ sal_Bool CorbaType::dumpDependedTypes(CorbaOptions* pOptions, FileStream& o, Typ exit(99); } } - iter++; + ++iter; } return ret; @@ -411,8 +411,7 @@ void CorbaType::dumpDepIncludes(FileStream& o, TypeSet* allreadyDumped, const OS } } } - - iter++; + ++iter; } } diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx index 7f94846b6cf7..ea343c7d412c 100644 --- a/codemaker/source/codemaker/typemanager.cxx +++ b/codemaker/source/codemaker/typemanager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: typemanager.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jsc $ $Date: 2001-03-07 13:58:42 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:27:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -196,7 +196,7 @@ sal_Bool RegistryTypeManager::init(sal_Bool bMerged, const StringVector& regFile freeRegistries(); return sal_False; } - iter++; + ++iter; } if (m_pImpl->m_isMerged) @@ -321,8 +321,7 @@ void RegistryTypeManager::freeRegistries() while (iter != m_pImpl->m_registries.end()) { delete *iter; - - iter++; + ++iter; } } @@ -348,8 +347,7 @@ RegistryKey RegistryTypeManager::searchTypeKey(const OString& name) if (!rootKey.openKey(OStringToOUString(m_pImpl->m_base + name, RTL_TEXTENCODING_UTF8), key)) break; } - - iter++; + ++iter; } } diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 71f66ecd90ee..fbf60a2c71c1 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cpputype.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: jsc $ $Date: 2001-04-06 14:01:15 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:28:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -283,7 +283,7 @@ sal_Bool CppuType::dumpDependedTypes(CppuOptions* pOptions) exit(99); } } - iter++; + ++iter; } return ret; @@ -526,8 +526,7 @@ void CppuType::dumpDepIncludes(FileStream& o, const OString& typeName, sal_Char* << "#endif\n"; } } - - iter++; + ++iter; } if (m_typeName.equals(typeName) && (getNestedTypeNames().getLength() > 0)) { diff --git a/codemaker/source/idlmaker/idltype.cxx b/codemaker/source/idlmaker/idltype.cxx index e46c543adac4..b8475ab1b94b 100644 --- a/codemaker/source/idlmaker/idltype.cxx +++ b/codemaker/source/idlmaker/idltype.cxx @@ -2,9 +2,9 @@ * * $RCSfile: idltype.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: mm $ $Date: 2000-09-21 07:43:11 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:28:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -182,7 +182,7 @@ sal_Bool IdlType::dumpDependedTypes(IdlOptions* pOptions) exit(99); } } - iter++; + ++iter; } return ret; @@ -313,8 +313,7 @@ void IdlType::dumpDepIncludes(FileStream& o, const OString& typeName, sal_Char* } dumpNameSpace( o, sal_False, sal_False, relType ); } - - iter++; + ++iter; } } diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 522f1dbd7733..b14da81cadbf 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -2,9 +2,9 @@ * * $RCSfile: javatype.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: jsc $ $Date: 2001-03-14 12:03:58 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:29:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -151,7 +151,7 @@ sal_Bool JavaType::dumpDependedTypes(JavaOptions* pOptions) exit(99); } } - iter++; + ++iter; } return ret; @@ -195,8 +195,7 @@ void JavaType::dumpDepImports(FileStream& o, const OString& typeName) { /// dump import; } - - iter++; + ++iter; } } diff --git a/idlc/source/astarray.cxx b/idlc/source/astarray.cxx index d133c380eee4..ba901b2dad2a 100644 --- a/idlc/source/astarray.cxx +++ b/idlc/source/astarray.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astarray.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,7 +99,7 @@ OString AstArray::makeName() name += openBracket; name += (*iter)->toString(); name += closeBracket; - iter++; + ++iter; } return name; } diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx index 70baf1b1523f..913b78ac6ad0 100644 --- a/idlc/source/astdeclaration.cxx +++ b/idlc/source/astdeclaration.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astdeclaration.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -220,7 +220,7 @@ sal_Bool AstDeclaration::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoad bRet = pDecl->dump(rKey, pLoader); } } - iter++; + ++iter; } } return bRet; diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index cb5352b86427..137971e73dff 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astdump.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -138,7 +138,7 @@ sal_Bool AstModule::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) { ((AstConstant*)pDecl)->dumpBlob(aBlob, index++); } - iter++; + ++iter; } pBlob = aBlob.getBlop(); @@ -261,7 +261,7 @@ sal_Bool AstService::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) nNeeds++; break; } - iter++; + ++iter; } } sal_uInt16 nReferences = nIfaceMember + nServMember + nObserves + nNeeds; @@ -322,7 +322,7 @@ sal_Bool AstService::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) } break; } - iter++; + ++iter; } const sal_uInt8* pBlob = aBlob.getBlop(); diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx index ea9365d5c4cd..6475400dc944 100644 --- a/idlc/source/astenum.cxx +++ b/idlc/source/astenum.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astenum.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,7 +90,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr) if (pConst->getConstValue()->compare(pExpr)) return pConst; - iter++; + ++iter; } if ( pExpr->getExprValue()->u.lval > m_enumValueCount ) @@ -131,7 +131,7 @@ sal_Bool AstEnum::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) if ( pDecl->getNodeType() == NT_enum_val ) ((AstConstant*)pDecl)->dumpBlob(aBlob, index++); - iter++; + ++iter; } const sal_uInt8* pBlob = aBlob.getBlop(); diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx index 2215d9cfa110..60ba6fd75006 100644 --- a/idlc/source/astinterface.cxx +++ b/idlc/source/astinterface.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astinterface.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -141,8 +141,7 @@ sal_Bool AstInterface::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader { ((AstOperation*)pDecl)->dumpBlob(aBlob, methodIndex++); } - - iter++; + ++iter; } const sal_uInt8* pBlob = aBlob.getBlop(); diff --git a/idlc/source/astoperation.cxx b/idlc/source/astoperation.cxx index 9263cd79c7d9..a33bf11c06ea 100644 --- a/idlc/source/astoperation.cxx +++ b/idlc/source/astoperation.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astoperation.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,7 +101,7 @@ void AstOperation::addExceptions(StringList* pExceptions) { idlc()->error()->error1(EIDL_ILLEGAL_RAISES, this); } - iter++; + ++iter; } } @@ -160,7 +160,7 @@ sal_Bool AstOperation::dumpBlob(RegistryTypeWriter& rBlob, sal_uInt16 index) OStringToOUString(pDecl->getLocalName(), RTL_TEXTENCODING_UTF8), paramMode); } - iter++; + ++iter; } } @@ -173,7 +173,7 @@ sal_Bool AstOperation::dumpBlob(RegistryTypeWriter& rBlob, sal_uInt16 index) { rBlob.setExcData(index, exceptIndex++, OStringToOUString((*iter)->getRelativName(), RTL_TEXTENCODING_UTF8) ); - iter++; + ++iter; } } diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index 6a65a19549a3..01f40629a32f 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astscope.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jsc $ $Date: 2001-04-10 09:20:03 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -143,7 +143,7 @@ sal_uInt16 AstScope::getNodeCount(NodeType nodeType) pDecl = *iter; if ( pDecl->getNodeType() == nodeType ) count++; - iter++; + ++iter; } return count; } @@ -242,7 +242,7 @@ AstDeclaration* AstScope::lookupByNameLocal(const OString& name) pDecl = *iter; if ( pDecl->getLocalName() == name ) return pDecl; - iter++; + ++iter; } return NULL; } @@ -272,7 +272,7 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) pDecl = ((AstInterface*)(*iter))->lookupByName(scopedName); if ( pDecl ) return pDecl; - iter++; + ++iter; } } // Not found @@ -298,7 +298,7 @@ AstDeclaration* AstScope::lookupInForwarded(const OString& scopedName) } break; } - iter++; + ++iter; } return NULL; } diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx index 10dcfa9fc97d..b4f65029d5a3 100644 --- a/idlc/source/aststruct.cxx +++ b/idlc/source/aststruct.cxx @@ -2,9 +2,9 @@ * * $RCSfile: aststruct.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -135,7 +135,7 @@ sal_Bool AstStruct::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) OStringToOUString(pMember->getType()->getRelativName(), RTL_TEXTENCODING_UTF8), pMember->getDocumentation(), OUString(), RT_ACCESS_READWRITE); } - iter++; + ++iter; } } diff --git a/idlc/source/astunion.cxx b/idlc/source/astunion.cxx index 71286353d20a..eb9ffd7801a4 100644 --- a/idlc/source/astunion.cxx +++ b/idlc/source/astunion.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astunion.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -181,7 +181,7 @@ AstUnionBranch* AstUnion::lookupDefault(sal_Bool bReportError) pBranch = (AstUnionBranch*)pDecl; if (pBranch == NULL) { - iter++; + ++iter; continue; } if ( pBranch->getLabel() != NULL && @@ -192,7 +192,7 @@ AstUnionBranch* AstUnion::lookupDefault(sal_Bool bReportError) return pBranch; } } - iter++; + ++iter; } return NULL; } @@ -227,7 +227,7 @@ AstUnionBranch* AstUnion::lookupLabel(AstUnionBranch* pBranch) pB = (AstUnionBranch*)pDecl; if ( !pB ) { - iter++; + ++iter; continue; } if ( pB->getLabel() != NULL && @@ -238,7 +238,7 @@ AstUnionBranch* AstUnion::lookupLabel(AstUnionBranch* pBranch) return pBranch; } } - iter++; + ++iter; } return NULL; } @@ -288,7 +288,7 @@ AstUnionBranch* AstUnion::lookupEnum(AstUnionBranch* pBranch) pB = (AstUnionBranch*)pDecl; if ( !pB ) { - iter++; + ++iter; continue; } if ( pB->getLabel() != NULL && @@ -299,7 +299,7 @@ AstUnionBranch* AstUnion::lookupEnum(AstUnionBranch* pBranch) return pBranch; } } - iter++; + ++iter; } return NULL; } @@ -350,7 +350,7 @@ sal_Bool AstUnion::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) pBranch = (AstUnionBranch*)pDecl; if (pBranch == pDefault) { - iter++; + ++iter; continue; } @@ -366,7 +366,7 @@ sal_Bool AstUnion::dump(RegistryKey& rKey, RegistryTypeWriterLoader* pLoader) OStringToOUString(pBranch->getType()->getRelativName(), RTL_TEXTENCODING_UTF8), pBranch->getDocumentation(), OUString(), RT_ACCESS_READWRITE, aConst); } - iter++; + ++iter; } if ( pDefault ) diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx index 66314369016d..be3a2791d070 100644 --- a/idlc/source/fehelper.cxx +++ b/idlc/source/fehelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fehelper.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -160,7 +160,7 @@ sal_Bool FeInheritanceHeader::initializeInherits(StringList* pInherits) idlc()->error()->lookupError(*iter); return sal_False; } - iter++; + ++iter; } } return sal_True; @@ -186,7 +186,7 @@ sal_Bool FeInterfaceHeader::initializeInherits(StringList* pInherits) idlc()->error()->inheritanceError(getName(), *iter); return sal_False; } - iter++; + ++iter; } return sal_True; } diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx index 01fa11e9ba6c..57befdea9b48 100644 --- a/idlc/source/idlcproduce.cxx +++ b/idlc/source/idlcproduce.cxx @@ -2,9 +2,9 @@ * * $RCSfile: idlcproduce.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2001-03-15 12:30:43 $ + * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -159,7 +159,7 @@ static sal_Bool cleanPath() idlc()->getOptions()->getProgramName().getStr(), (*iter).getStr()); return sal_False; } - iter++; + ++iter; } delete pCreatedDirectories; } |