You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
@@ -178,7 +178,8 @@ int detect_prime() {
|
||||
|
||||
close(fdset[0]);
|
||||
|
||||
if (i) setenv("DRI_PRIME", "1", 1);
|
||||
if (i)
|
||||
setenv("DRI_PRIME", "1", 1);
|
||||
create_context();
|
||||
|
||||
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||
|
||||
@@ -551,7 +551,8 @@ int DisplayServerX11::get_screen_count() const {
|
||||
// Using Xinerama Extension
|
||||
int event_base, error_base;
|
||||
const Bool ext_okay = XineramaQueryExtension(x11_display, &event_base, &error_base);
|
||||
if (!ext_okay) return 0;
|
||||
if (!ext_okay)
|
||||
return 0;
|
||||
|
||||
int count;
|
||||
XineramaScreenInfo *xsi = XineramaQueryScreens(x11_display, &count);
|
||||
@@ -600,11 +601,13 @@ Rect2i DisplayServerX11::screen_get_usable_rect(int p_screen) const {
|
||||
// Using Xinerama Extension
|
||||
int event_base, error_base;
|
||||
const Bool ext_okay = XineramaQueryExtension(x11_display, &event_base, &error_base);
|
||||
if (!ext_okay) return Rect2i(0, 0, 0, 0);
|
||||
if (!ext_okay)
|
||||
return Rect2i(0, 0, 0, 0);
|
||||
|
||||
int count;
|
||||
XineramaScreenInfo *xsi = XineramaQueryScreens(x11_display, &count);
|
||||
if (p_screen >= count) return Rect2i(0, 0, 0, 0);
|
||||
if (p_screen >= count)
|
||||
return Rect2i(0, 0, 0, 0);
|
||||
|
||||
Rect2i rect = Rect2i(xsi[p_screen].x_org, xsi[p_screen].y_org, xsi[p_screen].width, xsi[p_screen].height);
|
||||
XFree(xsi);
|
||||
@@ -827,7 +830,8 @@ void DisplayServerX11::window_set_current_screen(int p_screen, WindowID p_window
|
||||
WindowData &wd = windows[p_window];
|
||||
|
||||
int count = get_screen_count();
|
||||
if (p_screen >= count) return;
|
||||
if (p_screen >= count)
|
||||
return;
|
||||
|
||||
if (window_get_mode(p_window) == WINDOW_MODE_FULLSCREEN) {
|
||||
Point2i position = screen_get_position(p_screen);
|
||||
|
||||
@@ -463,7 +463,8 @@ void JoypadLinux::process_joypads() {
|
||||
}
|
||||
for (int i = 0; i < JOYPADS_MAX; i++) {
|
||||
|
||||
if (joypads[i].fd == -1) continue;
|
||||
if (joypads[i].fd == -1)
|
||||
continue;
|
||||
|
||||
input_event events[32];
|
||||
Joypad *joy = &joypads[i];
|
||||
|
||||
Reference in New Issue
Block a user