diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-21 10:26:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-21 10:27:17 +0200 |
commit | 8762aa986dbca42e61cc8fb1b2c1d2ca66bcfcbe (patch) | |
tree | af1f197feb0a40e819cc4ed74efce934935c9cae /basic/source/comp | |
parent | b19ac3c4c6b4a41a1f3acac68b299fd676428a87 (diff) |
clang-tidy modernize-loop-convert in b*
Change-Id: I8ac6eb59e213eafa78e3dc4578738b53e8adef5b
Diffstat (limited to 'basic/source/comp')
-rw-r--r-- | basic/source/comp/parser.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/symtbl.cxx | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index a26f5e6e0e62..87af41228bce 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -133,8 +133,8 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bClassModule = ( pm->GetModuleType() == css::script::ModuleType::CLASS ); OSL_TRACE("Parser - %s, bClassModule %d", OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; - for( short i = 0; i < 26; i++ ) - eDefTypes[ i ] = SbxVARIANT; // no explicit default type + for(SbxDataType & eDefType : eDefTypes) + eDefType = SbxVARIANT; // no explicit default type aPublics.SetParent( &aGlobals ); aGlobals.SetParent( &aRtlSyms ); diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 7d9692634b26..94f1be350434 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -245,12 +245,11 @@ sal_uInt32 SbiSymPool::Reference( const OUString& rName ) void SbiSymPool::CheckRefs() { - for (size_t i = 0; i < m_Data.size(); ++i) + for (std::unique_ptr<SbiSymDef> & r : m_Data) { - SbiSymDef &r = *m_Data[ i ]; - if( !r.IsDefined() ) + if( !r->IsDefined() ) { - pParser->Error( ERRCODE_BASIC_UNDEF_LABEL, r.GetName() ); + pParser->Error( ERRCODE_BASIC_UNDEF_LABEL, r->GetName() ); } } } |