From e956e80c1fa1cc8aefcb1533e5acf5cf3c8ffdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 10 May 2020 12:56:01 +0200 Subject: 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. --- platform/iphone/export/export.cpp | 9 ++++++--- platform/iphone/godot_iphone.cpp | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'platform/iphone') diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 3efe338ac7..2222a7f552 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -423,7 +423,8 @@ String EditorExportPlatformIOS::_get_linker_flags() { String result; for (int i = 0; i < export_plugins.size(); ++i) { String flags = export_plugins[i]->get_ios_linker_flags(); - if (flags.length() == 0) continue; + if (flags.length() == 0) + continue; if (result.length() > 0) { result += ' '; } @@ -456,8 +457,10 @@ void EditorExportPlatformIOS::_blend_and_rotate(Ref &p_dst, Ref &p int xs = (x_pos >= 0) ? 0 : -x_pos; int ys = (y_pos >= 0) ? 0 : -y_pos; - if (sw + x_pos > p_dst->get_width()) sw = p_dst->get_width() - x_pos; - if (sh + y_pos > p_dst->get_height()) sh = p_dst->get_height() - y_pos; + if (sw + x_pos > p_dst->get_width()) + sw = p_dst->get_width() - x_pos; + if (sh + y_pos > p_dst->get_height()) + sh = p_dst->get_height() - y_pos; for (int y = ys; y < sh; y++) { for (int x = xs; x < sw; x++) { diff --git a/platform/iphone/godot_iphone.cpp b/platform/iphone/godot_iphone.cpp index 3e67362e16..cea0e5c7f0 100644 --- a/platform/iphone/godot_iphone.cpp +++ b/platform/iphone/godot_iphone.cpp @@ -50,7 +50,8 @@ int iphone_main(int width, int height, int argc, char **argv, String data_dir) { size_t len = strlen(argv[0]); while (len--) { - if (argv[0][len] == '/') break; + if (argv[0][len] == '/') + break; } if (len >= 0) { -- cgit v1.2.3