aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cocoa/InfoBar.mm2
-rw-r--r--cocoa/PlatCocoa.mm2
-rw-r--r--cocoa/ScintillaView.mm2
-rw-r--r--gtk/PlatGTK.cxx6
-rw-r--r--win32/PlatWin.cxx10
-rw-r--r--win32/ScintillaWin.cxx4
6 files changed, 13 insertions, 13 deletions
diff --git a/cocoa/InfoBar.mm b/cocoa/InfoBar.mm
index 5dd74f46f..db30dd134 100644
--- a/cocoa/InfoBar.mm
+++ b/cocoa/InfoBar.mm
@@ -351,7 +351,7 @@ static float BarFontSize = 10.0;
// We only work with some preset zoom values. If the given value does not correspond
// to one then show no selection.
- while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
+ while (count < numberOfDefaultItems && (std::abs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
count++;
if (count == numberOfDefaultItems)
[mZoomPopup selectItemAtIndex: -1];
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index 08b3facfd..2b41f476d 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -252,7 +252,7 @@ void AddToIntervalVector(std::vector<Interval> &vi, XYPOSITION left, XYPOSITION
vi.push_back(interval);
} else {
Interval &last = vi.back();
- if (fabs(last.right-interval.left) < 0.01) {
+ if (std::abs(last.right-interval.left) < 0.01) {
// If new left is very close to previous right then extend last item
last.right = interval.right;
} else {
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 116ea36e9..84dbff16a 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -1235,7 +1235,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) {
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
zoomDelta += event.magnification * 10.0;
- if (fabs(zoomDelta)>=1.0) {
+ if (std::abs(zoomDelta)>=1.0) {
long zoomFactor = static_cast<long>([self getGeneralProperty: SCI_GETZOOM] + zoomDelta);
[self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value: 0];
zoomDelta = 0.0;
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index bb53bd693..7d555e312 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -408,13 +408,13 @@ void SurfaceImpl::LineTo(int x_, int y_) {
// Horizontal or vertical lines can be more precisely drawn as a filled rectangle
int xEnd = x_ - xDelta;
int left = std::min(x, xEnd);
- int width = abs(x - xEnd) + 1;
+ int width = std::abs(x - xEnd) + 1;
int yEnd = y_ - yDelta;
int top = std::min(y, yEnd);
- int height = abs(y - yEnd) + 1;
+ int height = std::abs(y - yEnd) + 1;
cairo_rectangle(context, left, top, width, height);
cairo_fill(context);
- } else if ((abs(xDiff) == abs(yDiff))) {
+ } else if ((std::abs(xDiff) == std::abs(yDiff))) {
// 45 degree slope
cairo_move_to(context, x + 0.5, y + 0.5);
cairo_line_to(context, x_ + 0.5 - xDelta, y_ + 0.5 - yDelta);
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 229b4d2e6..fa1147b0f 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -278,7 +278,7 @@ constexpr D2D1_TEXT_ANTIALIAS_MODE DWriteMapFontQuality(int extraFontFlag) noexc
void SetLogFont(LOGFONTW &lf, const char *faceName, int characterSet, float size, int weight, bool italic, int extraFontFlag) {
lf = LOGFONTW();
// The negative is to allow for leading
- lf.lfHeight = -(abs(std::lround(size)));
+ lf.lfHeight = -(std::abs(std::lround(size)));
lf.lfWeight = weight;
lf.lfItalic = italic ? 1 : 0;
lf.lfCharSet = static_cast<BYTE>(characterSet);
@@ -1230,14 +1230,14 @@ void SurfaceD2D::LineTo(int x_, int y_) {
// Horizontal or vertical lines can be more precisely drawn as a filled rectangle
const int xEnd = x_ - xDelta;
const int left = std::min(x, xEnd);
- const int width = abs(x - xEnd) + 1;
+ const int width = std::abs(x - xEnd) + 1;
const int yEnd = y_ - yDelta;
const int top = std::min(y, yEnd);
- const int height = abs(y - yEnd) + 1;
+ const int height = std::abs(y - yEnd) + 1;
const D2D1_RECT_F rectangle1 = D2D1::RectF(static_cast<float>(left), static_cast<float>(top),
static_cast<float>(left+width), static_cast<float>(top+height));
pRenderTarget->FillRectangle(&rectangle1, pBrush);
- } else if ((abs(xDiff) == abs(yDiff))) {
+ } else if ((std::abs(xDiff) == std::abs(yDiff))) {
// 45 degree slope
pRenderTarget->DrawLine(D2D1::Point2F(x + 0.5f, y + 0.5f),
D2D1::Point2F(x_ + 0.5f - xDelta, y_ + 0.5f - yDelta), pBrush);
@@ -3139,7 +3139,7 @@ LRESULT ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam
return ::DefWindowProc(hWnd, iMessage, wParam, lParam);
case WM_MOUSEWHEEL:
wheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam);
- if (abs(wheelDelta) >= WHEEL_DELTA) {
+ if (std::abs(wheelDelta) >= WHEEL_DELTA) {
const int nRows = GetVisibleRows();
int linesToScroll = 1;
if (nRows > 1) {
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 7dc0a9255..a8275ec4d 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1343,7 +1343,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
}
// Either SCROLL or ZOOM. We handle the wheel steppings calculation
wheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam);
- if (abs(wheelDelta) >= WHEEL_DELTA && linesPerScroll > 0) {
+ if (std::abs(wheelDelta) >= WHEEL_DELTA && linesPerScroll > 0) {
Sci::Line linesToScroll = linesPerScroll;
if (linesPerScroll == WHEEL_PAGESCROLL)
linesToScroll = LinesOnScreen() - 1;
@@ -2712,7 +2712,7 @@ void ScintillaWin::ImeStartComposition() {
deviceHeight = (sizeZoomed * surface->LogPixelsY()) / 72;
}
// The negative is to allow for leading
- lf.lfHeight = -(abs(deviceHeight / SC_FONT_SIZE_MULTIPLIER));
+ lf.lfHeight = -(std::abs(deviceHeight / SC_FONT_SIZE_MULTIPLIER));
lf.lfWeight = vs.styles[styleHere].weight;
lf.lfItalic = static_cast<BYTE>(vs.styles[styleHere].italic ? 1 : 0);
lf.lfCharSet = DEFAULT_CHARSET;