You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +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:
@@ -1656,7 +1656,8 @@ String DisplayServerOSX::global_menu_get_item_submenu(const String &p_menu_root,
|
||||
const NSMenu *sub_menu = [menu_item submenu];
|
||||
if (sub_menu) {
|
||||
for (Map<String, NSMenu *>::Element *E = submenu.front(); E; E = E->next()) {
|
||||
if (E->get() == sub_menu) return E->key();
|
||||
if (E->get() == sub_menu)
|
||||
return E->key();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2479,7 +2480,8 @@ void DisplayServerOSX::_set_window_per_pixel_transparency_enabled(bool p_enabled
|
||||
ERR_FAIL_COND(!windows.has(p_window));
|
||||
WindowData &wd = windows[p_window];
|
||||
|
||||
if (!OS_OSX::get_singleton()->is_layered_allowed()) return;
|
||||
if (!OS_OSX::get_singleton()->is_layered_allowed())
|
||||
return;
|
||||
if (wd.layered_window != p_enabled) {
|
||||
if (p_enabled) {
|
||||
[wd.window_object setBackgroundColor:[NSColor clearColor]];
|
||||
|
||||
@@ -374,7 +374,8 @@ bool joypad::check_ff_features() {
|
||||
if (ret == FF_OK && (features.supportedEffects & FFCAP_ET_CONSTANTFORCE)) {
|
||||
uint32_t val;
|
||||
ret = FFDeviceGetForceFeedbackProperty(ff_device, FFPROP_FFGAIN, &val, sizeof(val));
|
||||
if (ret != FF_OK) return false;
|
||||
if (ret != FF_OK)
|
||||
return false;
|
||||
int num_axes = features.numFfAxes;
|
||||
ff_axes = (DWORD *)memalloc(sizeof(DWORD) * num_axes);
|
||||
ff_directions = (LONG *)memalloc(sizeof(LONG) * num_axes);
|
||||
@@ -509,14 +510,16 @@ void JoypadOSX::joypad_vibration_stop(int p_id, uint64_t p_timestamp) {
|
||||
|
||||
int JoypadOSX::get_joy_index(int p_id) const {
|
||||
for (int i = 0; i < device_list.size(); i++) {
|
||||
if (device_list[i].id == p_id) return i;
|
||||
if (device_list[i].id == p_id)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int JoypadOSX::get_joy_ref(IOHIDDeviceRef p_device) const {
|
||||
for (int i = 0; i < device_list.size(); i++) {
|
||||
if (device_list[i].device_ref == p_device) return i;
|
||||
if (device_list[i].device_ref == p_device)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user