summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorRadhey Parekh <radhey.parekh@gmail.com>2022-08-22 18:13:15 +0530
committerHossein <hossein@libreoffice.org>2022-09-06 02:26:36 +0200
commitfeb8d07333544ff2206489b786b7af30744d014a (patch)
tree390a8598ac73faf539a90c9b912b6c7d1c31a635 /libreofficekit
parent540a312af2f02108ea90f5d2a9f3bf573db622e5 (diff)
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: Ic9009eda963f922fc4d2e75a5002026eda63a7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138686 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
index bb0e7edd390d..973e2095275a 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
@@ -377,11 +377,11 @@ void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
if ( strcmp(sName, "zoom-in-symbolic") == 0)
{
- for ( size_t i = 0; i < SAL_N_ELEMENTS( fZooms ); i++ )
+ for ( const auto& i : fZooms )
{
- if ( fCurrentZoom < fZooms[i] )
+ if ( fCurrentZoom < i )
{
- fZoom = fZooms[i];
+ fZoom = i;
break;
}
}
@@ -392,11 +392,11 @@ void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
}
else if ( strcmp(sName, "zoom-out-symbolic") == 0)
{
- for ( size_t i = 0; i < SAL_N_ELEMENTS( fZooms ); i++ )
+ for ( const auto& i : fZooms )
{
- if ( fCurrentZoom > fZooms[i] )
+ if ( fCurrentZoom > i )
{
- fZoom = fZooms[i];
+ fZoom = i;
}
}
}