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 | 4098bee4df45d3208aaced3f39acc3b2a92977d2 (patch) | |
tree | 2f869b6dd45381cdd7a3d37f145c69e0267c39d5 /include/Platform.h | |
parent | 0295c75b63dad5d4bde682e40270fe681eb47d56 (diff) | |
download | scintilla-mirror-4098bee4df45d3208aaced3f39acc3b2a92977d2.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 |