summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/baside2b.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-03-13 21:11:09 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-16 20:16:46 +0100
commit10a48c737d347bcce765c8fbe009bc1dd0bb0c4d (patch)
tree6688e9ca36964bcbf589e60452a331b49a81bfde /basctl/source/basicide/baside2b.cxx
parentbb9728bbf9bb29ef2b6ca582a382f66e9adf2623 (diff)
Simplify containers iterations in basctl, basegfx, basic, bridges
Use range-based loop or replace with STL functions Change-Id: I8594740103bdc2091c2d03d4b92bbe8393f5378c Reviewed-on: https://gerrit.libreoffice.org/69223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r--basctl/source/basicide/baside2b.cxx29
1 files changed, 3 insertions, 26 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index e1d526df52cf..728ac019d167 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2877,32 +2877,9 @@ UnoTypeCodeCompletetor::UnoTypeCodeCompletetor( const std::vector< OUString >& a
return;
}
- auto j = aVect.begin() + 1;//start from aVect[1]: aVect[0] is the variable name
- OUString sMethName;
-
- while( j != aVect.end() )
- {
- sMethName = *j;
-
- if( CodeCompleteOptions::IsExtendedTypeDeclaration() )
- {
- if( !CheckMethod(sMethName) && !CheckField(sMethName) )
- {
- bCanComplete = false;
- break;
- }
- }
- else
- {
- if( !CheckField(sMethName) )
- {
- bCanComplete = false;
- break;
- }
- }
-
- ++j;
- }
+ //start from aVect[1]: aVect[0] is the variable name
+ bCanComplete = std::none_of(aVect.begin() + 1, aVect.end(), [this](const OUString& rMethName) {
+ return (!CodeCompleteOptions::IsExtendedTypeDeclaration() || !CheckMethod(rMethName)) && !CheckField(rMethName); });
}
std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassMethods() const