diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2014-01-21 09:45:29 +1100 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2014-01-21 09:45:29 +1100 |
commit | c63c9dc7ca058d1b352c14f8052769d541c7e955 (patch) | |
tree | 726bbd8e98196bc0b224448af3ed6227fae96d3e /src/CallTip.cxx | |
parent | 023603c25dfdc73b0a51baaf3309d1bf18e04261 (diff) | |
download | scintilla-mirror-c63c9dc7ca058d1b352c14f8052769d541c7e955.tar.gz |
Added ELEMENTS macro and use it to clarify determining size of arrays.
Diffstat (limited to 'src/CallTip.cxx')
-rw-r--r-- | src/CallTip.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; |