From 1aa4df615fa5599d05e9dd5e925b5852676185fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 28 Mar 2016 17:12:04 +0200 Subject: use SAL_N_ELEMENTS in for loops for with git grep -n 'for.*sizeof' Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f Reviewed-on: https://gerrit.libreoffice.org/23569 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basctl/source/basicide/baside2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basctl') diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index b27605b766b7..046fc92c0031 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1564,7 +1564,7 @@ void ModulWindowLayout::SyntaxColors::NewConfig (bool bFirst) }; bool bChanged = false; - for (unsigned i = 0; i != sizeof vIds / sizeof vIds[0]; ++i) + for (unsigned i = 0; i != SAL_N_ELEMENTS(vIds); ++i) { Color const aColor = aConfig.GetColorValue(vIds[i].eEntry).nColor; Color& rMyColor = aColors[vIds[i].eTokenType]; -- cgit