From 50bbd6a2bea15a623d19a8a20c5cb01f8cfbe1bd Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 25 Mar 2019 11:42:40 +1100 Subject: Backport: Use generic std::abs instead of abs and fabs. Backport of changeset 7330:09e5fe965a79. --- win32/ScintillaWin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win32/ScintillaWin.cxx') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 6561da916..018df27e0 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1327,7 +1327,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; @@ -2689,7 +2689,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(vs.styles[styleHere].italic ? 1 : 0); lf.lfCharSet = DEFAULT_CHARSET; -- cgit v1.2.3