diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
commit | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch) | |
tree | 894c5070a709198ed994db7c7d0c0e124abbc9e5 /platform | |
parent | 5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff) |
Some code changed with Clang-Tidy
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/joypad_linux.cpp | 1 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 8 | ||||
-rw-r--r-- | platform/x11/power_x11.cpp | 5 |
3 files changed, 6 insertions, 8 deletions
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp index 21c3b0ac91..e6328ee14d 100644 --- a/platform/x11/joypad_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -101,7 +101,6 @@ void JoypadLinux::joy_thread_func(void *p_user) { JoypadLinux *joy = (JoypadLinux *)p_user; joy->run_joypad_thread(); } - return; } void JoypadLinux::run_joypad_thread() { diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 6421dc270f..bf6bc0b464 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -146,7 +146,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a if (is_stdout_verbose()) { WARN_PRINT("IME is disabled"); } - modifiers = XSetLocaleModifiers("@im=none"); + XSetLocaleModifiers("@im=none"); WARN_PRINT("Error setting locale modifiers"); } @@ -1032,9 +1032,7 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) { } XSetWMNormalHints(x11_display, x11_window, xsh); XFree(xsh); - } - if (!p_enabled) { // put back or remove decorations according to the last set borderless state Hints hints; Atom property; @@ -1201,7 +1199,7 @@ Point2 OS_X11::get_window_position() const { void OS_X11::set_window_position(const Point2 &p_position) { int x = 0; int y = 0; - if (get_borderless_window() == false) { + if (!get_borderless_window()) { //exclude window decorations XSync(x11_display, False); Atom prop = XInternAtom(x11_display, "_NET_FRAME_EXTENTS", True); @@ -3051,8 +3049,6 @@ void OS_X11::alert(const String &p_alert, const String &p_title) { } else { print_line(p_alert); } - - return; } bool g_set_icon_error = false; diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp index 50da6a4967..758bd84114 100644 --- a/platform/x11/power_x11.cpp +++ b/platform/x11/power_x11.cpp @@ -202,7 +202,10 @@ void PowerX11::check_proc_acpi_battery(const char *node, bool *have_battery, boo * We pick the battery that claims to have the most minutes left. * (failing a report of minutes, we'll take the highest percent.) */ - if ((secs < 0) && (this->nsecs_left < 0)) { + // -- GODOT start -- + //if ((secs < 0) && (this->nsecs_left < 0)) { + if (this->nsecs_left < 0) { + // -- GODOT end -- if ((pct < 0) && (this->percent_left < 0)) { choose = true; /* at least we know there's a battery. */ } |