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 | 2bd8a54e0624143ee5128d1e224b1635b2c5d1f4 (patch) | |
| tree | 6acd5402304cd8f9efc400d11ca32dab95d5410d /src/CallTip.cxx | |
| parent | 56d581a730cd2c5dd0959c6b3bd532c9f5ad42e2 (diff) | |
| download | scintilla-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.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; | 
