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
commit90a498aa44da18855534f4e8b001de07460ccb72 (patch)
treeaf1d8fef272b53b1b0d261eb1a24314fbaba9dbe /include/Platform.h
parentfb900ef3e4342b79a529a99fd120e628ab53f400 (diff)
downloadscintilla-mirror-90a498aa44da18855534f4e8b001de07460ccb72.tar.gz
Backport: Feature [feature-requests:#1340] Move and use Point functions to avoid casting.
Backport of changeset 7976:4ba647207671.
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 bb453e20b..b678deadc 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_));
}