diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/PlatWin.cxx | 10 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 4 |
2 files changed, 7 insertions, 7 deletions
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; |