diff options
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 10 |
1 files changed, 5 insertions, 5 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) { |