diff options
Diffstat (limited to 'cocoa')
| -rw-r--r-- | cocoa/PlatCocoa.mm | 10 | ||||
| -rw-r--r-- | cocoa/ScintillaView.mm | 4 | 
2 files changed, 7 insertions, 7 deletions
| diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 9ba85bc66..bdda8752b 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -456,8 +456,8 @@ void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back)    {      FillColour(back);      // Snap rectangle boundaries to nearest int -    rc.left = std::round(rc.left); -    rc.right = std::round(rc.right); +    rc.left = lround(rc.left); +    rc.right = lround(rc.right);      CGRect rect = PRectangleToCGRect(rc);      CGContextFillRect(gc, rect);    } @@ -647,8 +647,8 @@ void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, Colou  {    if ( gc ) {      // Snap rectangle boundaries to nearest int -    rc.left = std::round(rc.left); -    rc.right = std::round(rc.right); +    rc.left = lround(rc.left); +    rc.right = lround(rc.right);      // Set the Fill color to match      CGContextSetRGBFillColor( gc, fill.GetRed() / 255.0, fill.GetGreen() / 255.0, fill.GetBlue() / 255.0, alphaFill / 255.0 );      CGContextSetRGBStrokeColor( gc, outline.GetRed() / 255.0, outline.GetGreen() / 255.0, outline.GetBlue() / 255.0, alphaOutline / 255.0 ); @@ -1065,7 +1065,7 @@ XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {    const int sizeStringLength = ELEMENTS( sizeString );    XYPOSITION width = WidthText( font_, sizeString, sizeStringLength  ); -  return std::round(width / sizeStringLength); +  return round(width / sizeStringLength);  }  void SurfaceImpl::SetClip(PRectangle rc) { diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index e89b1fdf1..224aac06c 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -813,14 +813,14 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)      // Only snap for positions inside the document - allow outside      // for overshoot.      long lineHeight = mOwner.backend->WndProc(SCI_TEXTHEIGHT, 0, 0); -    rc.origin.y = std::round(static_cast<XYPOSITION>(rc.origin.y) / lineHeight) * lineHeight; +    rc.origin.y = roundf(static_cast<XYPOSITION>(rc.origin.y) / lineHeight) * lineHeight;    }  	// Snap to whole points - on retina displays this avoids visual debris  	// when scrolling horizontally.  	if ((rc.origin.x > 0) && (NSMaxX(rc) < contentRect.size.width)) {  		// Only snap for positions inside the document - allow outside  		// for overshoot. -		rc.origin.x = std::round(static_cast<XYPOSITION>(rc.origin.x)); +		rc.origin.x = roundf(static_cast<XYPOSITION>(rc.origin.x));  	}    return rc;  } | 
