diff options
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r-- | vcl/unx/gtk/a11y/atktextattributes.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/resourceprovider.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalmenu.cxx | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx index 6da4d349cac3..b7857d079b66 100644 --- a/vcl/unx/gtk/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk/a11y/atktextattributes.cxx @@ -1071,8 +1071,8 @@ attribute_set_new_from_property_values( sal_Int32 aIndexList[TEXT_ATTRIBUTE_LAST] = { -1 }; // Initialize index array with -1 - for( sal_Int32 attr = 0; attr < TEXT_ATTRIBUTE_LAST; ++attr ) - aIndexList[attr] = -1; + for(sal_Int32 & rn : aIndexList) + rn = -1; find_exported_attributes(aIndexList, rAttributeList); diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx index 9727a9cf9654..c6b09452df91 100644 --- a/vcl/unx/gtk/fpicker/resourceprovider.cxx +++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx @@ -60,10 +60,10 @@ static const struct static sal_Int16 CtrlIdToResId( sal_Int32 aControlId ) { - for ( size_t i = 0; i < SAL_N_ELEMENTS( CtrlIdToResIdTable ); i++ ) + for (auto & i : CtrlIdToResIdTable) { - if ( CtrlIdToResIdTable[i].ctrlId == aControlId ) - return CtrlIdToResIdTable[i].resId; + if ( i.ctrlId == aControlId ) + return i.resId; } return -1; } diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index a79713ab631f..78d337a14fe2 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -993,9 +993,8 @@ void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar) { pMenuBar->HandleMenuActivateEvent(mpVCLMenu); pMenuBar->HandleMenuDeActivateEvent(mpVCLMenu); - for ( size_t nPos = 0; nPos < maItems.size(); nPos++ ) + for (GtkSalMenuItem* pSalItem : maItems) { - GtkSalMenuItem *pSalItem = maItems[ nPos ]; if ( pSalItem->mpSubMenu != nullptr ) { pSalItem->mpSubMenu->ActivateAllSubmenus(pMenuBar); |