diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:42:40 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:42:40 +1100 |
| commit | 50bbd6a2bea15a623d19a8a20c5cb01f8cfbe1bd (patch) | |
| tree | 816f87d781de223418432b915acf39bafef460b0 /win32/ScintillaWin.cxx | |
| parent | 2c20e36f4ec739fd0887aceda589fce2c1757342 (diff) | |
| download | scintilla-mirror-50bbd6a2bea15a623d19a8a20c5cb01f8cfbe1bd.tar.gz | |
Backport: Use generic std::abs instead of abs and fabs.
Backport of changeset 7330:09e5fe965a79.
Diffstat (limited to 'win32/ScintillaWin.cxx')
| -rw-r--r-- | win32/ScintillaWin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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<BYTE>(vs.styles[styleHere].italic ? 1 : 0); lf.lfCharSet = DEFAULT_CHARSET; |
