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 /cocoa | |
parent | 023603c25dfdc73b0a51baaf3309d1bf18e04261 (diff) | |
download | scintilla-mirror-c63c9dc7ca058d1b352c14f8052769d541c7e955.tar.gz |
Added ELEMENTS macro and use it to clarify determining size of arrays.
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/PlatCocoa.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 3c952e039..304798cbb 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -26,6 +26,7 @@ #include <vector> #include <map> +#include "StringCopy.h" #include "XPM.h" #import <Foundation/NSGeometry.h> @@ -1053,7 +1054,7 @@ XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) { if (!font_.GetID()) return 1; - const int sizeStringLength = (sizeof( sizeString ) / sizeof( sizeString[0] ) - 1); + const int sizeStringLength = ELEMENTS( sizeString ); int width = WidthText( font_, sizeString, sizeStringLength ); return (int) ((width / (float) sizeStringLength) + 0.5); |