diff options
author | Neil <nyamatongwe@gmail.com> | 2014-05-03 12:53:13 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-05-03 12:53:13 +1000 |
commit | f2f9466cff10eef54bd165bbfb99bbcc707a0cf4 (patch) | |
tree | dc5e982fd477996c745a35ad0569ea2e0393f944 /include/Platform.h | |
parent | c985bfbe6de31c510fada1bacccabf338e577c30 (diff) | |
download | scintilla-mirror-f2f9466cff10eef54bd165bbfb99bbcc707a0cf4.tar.gz |
Convenience Point constructor from integers as common source of shapes.
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h index e28fa2976..138eb8a75 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -103,6 +103,8 @@ public: explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) : x(x_), y(y_) { } + explicit Point(int x_, int y_) : x(static_cast<XYPOSITION>(x_)), y(static_cast<XYPOSITION>(y_)) { + } // Other automatically defined methods (assignment, copy constructor, destructor) are fine |