From b70fa47aec65fe95da94fc17640dda27650e9677 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Jun 2017 09:35:16 +0200 Subject: use more SAL_N_ELEMENTS part 1 - teach comphelper::containerToSequence to handle sized arrays - also use range based for-loop where appropriate. Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99 Reviewed-on: https://gerrit.libreoffice.org/38769 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- tools/source/generic/color.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/source/generic') diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index c635ce27f16f..c1055885ab76 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -259,7 +259,7 @@ SvStream& ReadColor( SvStream& rIStream, Color& rColor ) COL_BLACK // COL_FIELDTEXT }; - if ( nColorName < (sizeof( aColAry )/sizeof(ColorData)) ) + if ( nColorName < SAL_N_ELEMENTS( aColAry ) ) rColor.mnColor = aColAry[nColorName]; else rColor.mnColor = COL_BLACK; -- cgit