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
commit8bc5ddbe103f6e34538f0cbe9569201e0a5531ec (patch)
treef60cd26108bfd60fa338a43d430f3797b3bf25f2 /include/Platform.h
parentc6aab7142f462eaeab3fd517f9d876da835b0853 (diff)
downloadscintilla-mirror-8bc5ddbe103f6e34538f0cbe9569201e0a5531ec.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