diff options
-rw-r--r-- | check.mak | 2 | ||||
-rw-r--r-- | cocoa/PlatCocoa.mm | 10 | ||||
-rw-r--r-- | cocoa/ScintillaView.mm | 4 | ||||
-rw-r--r-- | gtk/PlatGTK.cxx | 4 |
4 files changed, 10 insertions, 10 deletions
@@ -43,7 +43,7 @@ curses_lexlib_objs = $(addprefix curses/, $(base_lexlib_objs)) curses_lexer_objs = $(addprefix curses/, $(base_lexer_objs)) all: | /tmp/scintilla - make -C $| -f check.mak -j4 bin/scintilla_win32.a \ + make -C $| -f check.mak -j8 bin/scintilla_win32.a \ bin/scintilla_cocoa.a bin/scintilla_gtk.a bin/scintilla_curses.a qt /tmp/scintilla: ; cp -rs `pwd` $@ 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; } diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 3e18423da..8dfbb2227 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -459,8 +459,8 @@ void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) { PenColour(back); if (context && (rc.left < maxCoordinate)) { // Protect against out of range - rc.left = std::round(rc.left); - rc.right = std::round(rc.right); + rc.left = lround(rc.left); + rc.right = lround(rc.right); cairo_rectangle(context, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); cairo_fill(context); |