aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/PlatCocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r--cocoa/PlatCocoa.mm17
1 files changed, 2 insertions, 15 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index 405cdee8e..fe1873ffa 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -405,13 +405,13 @@ void SurfaceImpl::LineTo(int x_, int y_)
//--------------------------------------------------------------------------------------------------
-void SurfaceImpl::Polygon(Scintilla::Point *pts, int npts, ColourDesired fore,
+void SurfaceImpl::Polygon(Scintilla::Point *pts, size_t npts, ColourDesired fore,
ColourDesired back)
{
// Allocate memory for the array of points.
std::vector<CGPoint> points(npts);
- for (int i = 0;i < npts;i++)
+ for (size_t i = 0;i < npts;i++)
{
// Quartz floating point issues: plot the MIDDLE of the pixels
points[i].x = pts[i].x + 0.5;
@@ -984,19 +984,6 @@ XYPOSITION SurfaceImpl::WidthText(Font &font_, const char *s, int len) {
return 1;
}
-XYPOSITION SurfaceImpl::WidthChar(Font &font_, char ch) {
- char str[2] = { ch, '\0' };
- if (font_.GetID())
- {
- CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_));
- textLayout->setText(str, 1, encoding, *TextStyleFromFont(font_));
-
- return textLayout->MeasureStringWidth();
- }
- else
- return 1;
-}
-
// This string contains a good range of characters to test for size.
const char sizeString[] = "`~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890"
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";