diff options
author | Neil <nyamatongwe@gmail.com> | 2014-05-03 13:30:18 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-05-03 13:30:18 +1000 |
commit | 9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1 (patch) | |
tree | c3e24e4e33c77abd593fc7f6d88f61c07c33d57b /include | |
parent | 32cae5a3a2c79282abba21a07d60130f05d86cea (diff) | |
download | scintilla-mirror-9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1.tar.gz |
Using casts and an alternate PRectangle constructor to make XYPOSITION <-> int
conversions and other conversions more consistent.
Diffstat (limited to 'include')
-rw-r--r-- | include/Platform.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h index 138eb8a75..5f8c2f2a1 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -126,6 +126,10 @@ public: PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) : left(left_), top(top_), right(right_), bottom(bottom_) { } + PRectangle(int left_, int top_, int right_, int bottom_) : + left(static_cast<XYPOSITION>(left_)), top(static_cast<XYPOSITION>(top_)), + right(static_cast<XYPOSITION>(right_)), bottom(static_cast<XYPOSITION>(bottom_)) { + } // Other automatically defined methods (assignment, copy constructor, destructor) are fine |