diff options
author | Neil <nyamatongwe@gmail.com> | 2017-06-12 11:49:56 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-06-12 11:49:56 +1000 |
commit | 46f9fd7509eaa2809392acf3a264b57a2daf973c (patch) | |
tree | 1e3ee8a900c4e4c7768abbe21bfa9acc4043b345 /src/Position.h | |
parent | 09972b3a179d7ea39ef6ce7e0474531797c549fb (diff) | |
download | scintilla-mirror-46f9fd7509eaa2809392acf3a264b57a2daf973c.tar.gz |
Removed unused functions and methods from Platform.h.
Replaced Platform::Clamp with Sci::clamp but will later change this to
std::clamp once on full C++17 compilers.
Drop MouseButtonBounce workaround for very early GTK+/Linux.
Diffstat (limited to 'src/Position.h')
-rw-r--r-- | src/Position.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Position.h b/src/Position.h index 67365e30f..258eb177f 100644 --- a/src/Position.h +++ b/src/Position.h @@ -25,6 +25,14 @@ typedef int Line; const Position invalidPosition = -1; +inline int clamp(int val, int minVal, int maxVal) { + if (val > maxVal) + val = maxVal; + if (val < minVal) + val = minVal; + return val; +} + } #endif |