aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-03 12:38:27 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-03 12:38:27 +1000
commit66bcc90314984f17644952cbe2b2be23c72ac0eb (patch)
tree24285e8777d84f00b7a66cd5ef22b31382ae3e3e
parentd0a70ff63d32d034a6ee0417466f50acafefba40 (diff)
downloadscintilla-mirror-66bcc90314984f17644952cbe2b2be23c72ac0eb.tar.gz
Move RoundXYPosition to global header to enable use in more modules.
-rw-r--r--include/Platform.h4
-rw-r--r--src/Editor.cxx4
2 files changed, 3 insertions, 5 deletions
diff --git a/include/Platform.h b/include/Platform.h
index 7683c9c84..f3a3362f8 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -77,7 +77,9 @@ namespace Scintilla {
typedef float XYPOSITION;
typedef double XYACCUMULATOR;
-//#define XYPOSITION int
+inline int RoundXYPosition(XYPOSITION xyPos) {
+ return int(xyPos + 0.5);
+}
// Underlying the implementation of the platform classes are platform specific types.
// Sometimes these need to be passed around by client code so they are defined here
diff --git a/src/Editor.cxx b/src/Editor.cxx
index b690d8011..aefca0a85 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -88,10 +88,6 @@ Timer::Timer() :
Idler::Idler() :
state(false), idlerID(0) {}
-static int RoundXYPosition(XYPOSITION xyPos) {
- return int(xyPos+0.5);
-}
-
static inline bool IsControlCharacter(int ch) {
// iscntrl returns true for lots of chars > 127 which are displayable
return ch >= 0 && ch < ' ';