summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2018-10-17 02:46:50 -0400
committerAaron Franke <arnfranke@yahoo.com>2018-10-19 09:11:14 -0400
commitdc2e73499a3264c6c77eb4ddadb6961d684c2941 (patch)
tree1c174aa4cc88f5becbe14bd581a44544ae93085a /scene/main/viewport.cpp
parentbde3e884c7b1506dd74cb39ea479ea98dd04e7a1 (diff)
Fix compile warnings for Windows from Linux
At least the ones I got when I compiled it using Mingw64 POSIX on Xubuntu 18.04. Plus use the Size2 of get_window_size() directly, rather than reconstructing it.
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index bb379ff4af..8dd1e507e8 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -629,10 +629,8 @@ Rect2 Viewport::get_visible_rect() const {
Rect2 r;
if (size == Size2()) {
-
- r = Rect2(Point2(), Size2(OS::get_singleton()->get_window_size().width, OS::get_singleton()->get_window_size().height));
+ r = Rect2(Point2(), OS::get_singleton()->get_window_size());
} else {
-
r = Rect2(Point2(), size);
}