From 2bd8a54e0624143ee5128d1e224b1635b2c5d1f4 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Tue, 21 Jan 2014 09:45:29 +1100 Subject: Added ELEMENTS macro and use it to clarify determining size of arrays. --- src/CallTip.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/CallTip.cxx') diff --git a/src/CallTip.cxx b/src/CallTip.cxx index c12a6e8eb..7dc23a4ac 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -14,6 +14,8 @@ #include "Platform.h" #include "Scintilla.h" + +#include "StringCopy.h" #include "CallTip.h" #ifdef SCI_NAMESPACE @@ -125,16 +127,14 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, Point(centreX + halfWidth, centreY + halfWidth / 2), Point(centreX, centreY - halfWidth + halfWidth / 2), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - colourBG, colourBG); + surface->Polygon(pts, ELEMENTS(pts), colourBG, colourBG); } else { // Down arrow Point pts[] = { Point(centreX - halfWidth, centreY - halfWidth / 2), Point(centreX + halfWidth, centreY - halfWidth / 2), Point(centreX, centreY + halfWidth - halfWidth / 2), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - colourBG, colourBG); + surface->Polygon(pts, ELEMENTS(pts), colourBG, colourBG); } } xEnd = rcClient.right; -- cgit v1.2.3