basic/source/sbx/sbxvar.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit c6c9d9e39365cec0fbc4097592dd77f2dd5b51fc Author: kelvin <[email protected]> AuthorDate: Tue Nov 4 04:03:31 2025 +0100 Commit: Hossein <[email protected]> CommitDate: Wed Nov 5 18:04:20 2025 +0100 tdf#145538 Convert iterator loop to range-based for loop Replace traditional SbxParams::const_iterator loop with modern range-based for loop in SbxVariable::GetName() for better readability and modern C++ style while preserving the comma-separation logic between parameters. Change-Id: Ib978b29b70bf6a0a85bf94be1a3dd67fea45529d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193379 Tested-by: Jenkins Reviewed-by: Hossein <[email protected]> diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 97f7c0347ad9..43cb0b73a03d 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -233,14 +233,15 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const } aTmp.append("("); - for (SbxParams::const_iterator iter = pInfo->m_Params.begin(); iter != pInfo->m_Params.end(); ++iter) + bool first = true; + for (auto const& i : pInfo->m_Params) { - auto const& i = *iter; int nt = i->eType & 0x0FFF; - if (iter != pInfo->m_Params.begin()) + if (!first) { aTmp.append(","); } + first = false; if( i->nFlags & SbxFlagBits::Optional ) { aTmp.append( GetSbxRes( StringId::Optional ) );
