aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CallTip.cxx
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2014-01-21 09:45:29 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2014-01-21 09:45:29 +1100
commit2bd8a54e0624143ee5128d1e224b1635b2c5d1f4 (patch)
tree6acd5402304cd8f9efc400d11ca32dab95d5410d /src/CallTip.cxx
parent56d581a730cd2c5dd0959c6b3bd532c9f5ad42e2 (diff)
downloadscintilla-mirror-2bd8a54e0624143ee5128d1e224b1635b2c5d1f4.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.cxx8
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;