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 | 69b778424b380a32a6c83526b678466712c4a220 (patch) | |
| tree | 808839f4df4bc62dd0d5faf5cd24620e8cbf8b3a /src/Position.h | |
| parent | ccfd60b0fda24c2daa06ff02b2f909850095a56a (diff) | |
| download | scintilla-mirror-69b778424b380a32a6c83526b678466712c4a220.tar.gz | |
Backport: Removed unused functions and methods from Platform.h.
Replaced Platform::Clamp with Sci::clamp.
Drop MouseButtonBounce workaround for very early GTK+/Linux.
Backported from changeset 6307:7030530a9a0f.
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 |
