diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-30 20:03:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-30 20:03:49 +0200 |
commit | 875075cd654e665e65560164ec499a764b706b1b (patch) | |
tree | 872e5b9ef986671e2a9d6d82647eccf27f944076 | |
parent | 5544ea4a178bc788c6b1ca5dd25dbc36ad14c072 (diff) | |
parent | 7de2c70e11ae6a1a4a1166ad2e413fd11400d2d9 (diff) |
Merge pull request #30961 from Calinou/window-size-error
Turn `OS.set_min/max_window_size()` warnings into errors
-rw-r--r-- | platform/osx/os_osx.mm | 4 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 4 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 992aff54f1..a48f784529 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -2411,7 +2411,7 @@ Size2 OS_OSX::get_min_window_size() const { void OS_OSX::set_min_window_size(const Size2 p_size) { if ((p_size != Size2()) && (max_size != Size2()) && ((p_size.x > max_size.x) || (p_size.y > max_size.y))) { - WARN_PRINT("Minimum window size can't be larger than maximum window size!"); + ERR_PRINT("Minimum window size can't be larger than maximum window size!"); return; } min_size = p_size; @@ -2427,7 +2427,7 @@ void OS_OSX::set_min_window_size(const Size2 p_size) { void OS_OSX::set_max_window_size(const Size2 p_size) { if ((p_size != Size2()) && ((p_size.x < min_size.x) || (p_size.y < min_size.y))) { - WARN_PRINT("Maximum window size can't be smaller than minimum window size!"); + ERR_PRINT("Maximum window size can't be smaller than minimum window size!"); return; } max_size = p_size; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 93d4482279..07470cec92 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1813,7 +1813,7 @@ Size2 OS_Windows::get_min_window_size() const { void OS_Windows::set_min_window_size(const Size2 p_size) { if ((p_size != Size2()) && (max_size != Size2()) && ((p_size.x > max_size.x) || (p_size.y > max_size.y))) { - WARN_PRINT("Minimum window size can't be larger than maximum window size!"); + ERR_PRINT("Minimum window size can't be larger than maximum window size!"); return; } min_size = p_size; @@ -1822,7 +1822,7 @@ void OS_Windows::set_min_window_size(const Size2 p_size) { void OS_Windows::set_max_window_size(const Size2 p_size) { if ((p_size != Size2()) && ((p_size.x < min_size.x) || (p_size.y < min_size.y))) { - WARN_PRINT("Maximum window size can't be smaller than minimum window size!"); + ERR_PRINT("Maximum window size can't be smaller than minimum window size!"); return; } max_size = p_size; diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 36bf51e7f9..0d1e702d04 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1266,7 +1266,7 @@ Size2 OS_X11::get_min_window_size() const { void OS_X11::set_min_window_size(const Size2 p_size) { if ((p_size != Size2()) && (max_size != Size2()) && ((p_size.x > max_size.x) || (p_size.y > max_size.y))) { - WARN_PRINT("Minimum window size can't be larger than maximum window size!"); + ERR_PRINT("Minimum window size can't be larger than maximum window size!"); return; } min_size = p_size; @@ -1295,7 +1295,7 @@ void OS_X11::set_min_window_size(const Size2 p_size) { void OS_X11::set_max_window_size(const Size2 p_size) { if ((p_size != Size2()) && ((p_size.x < min_size.x) || (p_size.y < min_size.y))) { - WARN_PRINT("Maximum window size can't be smaller than minimum window size!"); + ERR_PRINT("Maximum window size can't be smaller than minimum window size!"); return; } max_size = p_size; |