aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/Platform.h
diff options
context:
space:
mode:
authorZufu Liu <unknown>2020-02-09 09:19:56 +1100
committerZufu Liu <unknown>2020-02-09 09:19:56 +1100
commiteea3df558f3293ebedc7b88773e0706cdae23972 (patch)
treeae7d41ffe130b0e1c1fb2b31071e0cfbf4f79282 /include/Platform.h
parent7b35a02b461847b7d6260dc9e6a988651d8a290b (diff)
downloadscintilla-mirror-eea3df558f3293ebedc7b88773e0706cdae23972.tar.gz
Feature [feature-requests:#1340] Move and use Point functions to avoid casting.
Diffstat (limited to 'include/Platform.h')
-rw-r--r--include/Platform.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/Platform.h b/include/Platform.h
index 7a621c65e..cdaf65140 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -104,7 +104,7 @@ public:
constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) {
}
- static Point FromInts(int x_, int y_) noexcept {
+ static constexpr Point FromInts(int x_, int y_) noexcept {
return Point(static_cast<XYPOSITION>(x_), static_cast<XYPOSITION>(y_));
}
@@ -139,7 +139,7 @@ public:
left(left_), top(top_), right(right_), bottom(bottom_) {
}
- static PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept {
+ static constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept {
return PRectangle(static_cast<XYPOSITION>(left_), static_cast<XYPOSITION>(top_),
static_cast<XYPOSITION>(right_), static_cast<XYPOSITION>(bottom_));
}