aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/Platform.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-03 13:30:18 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-03 13:30:18 +1000
commit9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1 (patch)
treec3e24e4e33c77abd593fc7f6d88f61c07c33d57b /include/Platform.h
parent32cae5a3a2c79282abba21a07d60130f05d86cea (diff)
downloadscintilla-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/Platform.h')
-rw-r--r--include/Platform.h4
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