From d03692449b014377b0a9f5aded075a9515a268db Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 11 Sep 2020 17:10:00 -0700 Subject: [PATCH] Prefer C++ standard headers to their C counterpart (flutter/engine#21091) We currently use a mix of C standard includes (e.g. limits.h) and their C++ variants (e.g. climits). This migrates to a consistent style for all cases where the C++ variants are acceptable, but leaves the C equivalents in place where they are required, such as in the embedder API and other headers that may be used from C. --- engine/src/flutter/common/settings.h | 2 +- engine/src/flutter/examples/glfw/FlutterEmbedderGLFW.cc | 2 +- engine/src/flutter/flow/layers/layer_tree.h | 3 +-- engine/src/flutter/flow/matrix_decomposition_unittests.cc | 5 +---- engine/src/flutter/fml/command_line.h | 3 +-- engine/src/flutter/fml/log_settings.cc | 2 +- engine/src/flutter/fml/platform/android/scoped_java_ref.h | 3 ++- engine/src/flutter/fml/platform/posix/paths_posix.cc | 3 ++- .../flutter/fml/platform/posix/posix_wrappers_posix.cc | 2 +- engine/src/flutter/fml/platform/win/file_win.cc | 3 ++- engine/src/flutter/fml/platform/win/posix_wrappers_win.cc | 2 +- engine/src/flutter/fml/synchronization/waitable_event.cc | 6 +++--- .../fml/synchronization/waitable_event_unittest.cc | 7 +++---- engine/src/flutter/fml/time/time_delta.h | 5 ++--- engine/src/flutter/fml/time/time_point.h | 3 +-- engine/src/flutter/lib/ui/compositing/scene.h | 2 +- engine/src/flutter/lib/ui/compositing/scene_builder.h | 3 +-- engine/src/flutter/lib/ui/compositing/scene_host.h | 7 ++++--- engine/src/flutter/lib/ui/dart_runtime_hooks.cc | 7 +++---- engine/src/flutter/lib/ui/painting/canvas.cc | 5 +++-- engine/src/flutter/lib/ui/painting/path.cc | 5 +++-- engine/src/flutter/lib/ui/painting/path_measure.cc | 5 +++-- engine/src/flutter/lib/ui/semantics/semantics_node.cc | 2 +- engine/src/flutter/lib/ui/semantics/semantics_node.h | 3 +-- engine/src/flutter/lib/ui/window/pointer_data.cc | 2 +- engine/src/flutter/lib/ui/window/pointer_data.h | 2 +- engine/src/flutter/lib/ui/window/pointer_data_packet.cc | 2 +- engine/src/flutter/lib/ui/window/pointer_data_packet.h | 3 +-- .../lib/ui/window/pointer_data_packet_converter.cc | 5 +++-- .../flutter/lib/ui/window/pointer_data_packet_converter.h | 3 +-- engine/src/flutter/runtime/dart_service_isolate.cc | 2 +- engine/src/flutter/runtime/embedder_resources.cc | 2 +- engine/src/flutter/runtime/service_protocol.cc | 3 +-- engine/src/flutter/shell/common/engine_unittests.cc | 5 ++++- engine/src/flutter/shell/common/shell_unittests.cc | 2 +- .../common/cpp/client_wrapper/core_implementations.cc | 3 +-- .../platform/fuchsia/dart-pkg/fuchsia/sdk_ext/fuchsia.cc | 5 ++--- .../platform/fuchsia/dart-pkg/zircon/sdk_ext/natives.cc | 4 +--- .../shell/platform/fuchsia/dart_runner/dart_runner.cc | 3 ++- .../platform/fuchsia/dart_runner/embedder/snapshot.h | 2 +- .../src/flutter/shell/platform/fuchsia/flutter/runner.cc | 4 ++-- .../src/flutter/shell/platform/fuchsia/flutter/thread.cc | 5 ++--- .../shell/platform/fuchsia/runtime/dart/utils/files.cc | 3 ++- .../fuchsia/runtime/dart/utils/vmservice_object.cc | 6 +++--- engine/src/flutter/shell/platform/glfw/flutter_glfw.cc | 2 +- .../shell/platform/linux/fl_json_message_codec_test.cc | 7 ++++--- .../flutter/shell/platform/linux/testing/mock_engine.cc | 4 ++-- .../src/flutter/shell/platform/windows/flutter_windows.cc | 2 +- .../shell/platform/windows/system_utils_unittests.cc | 2 +- engine/src/flutter/third_party/tonic/dart_list.h | 2 +- .../third_party/tonic/file_loader/file_loader_fuchsia.cc | 2 +- .../tonic/filesystem/filesystem/eintr_wrapper.h | 2 +- .../third_party/tonic/filesystem/filesystem/file.cc | 5 +++-- .../third_party/tonic/filesystem/filesystem/path_posix.cc | 8 ++++---- .../third_party/tonic/filesystem/filesystem/path_win.cc | 4 ++-- .../src/flutter/third_party/txt/src/utils/TypeHelpers.h | 8 ++++---- 56 files changed, 100 insertions(+), 104 deletions(-) diff --git a/engine/src/flutter/common/settings.h b/engine/src/flutter/common/settings.h index 6d7b07a2ce..46f88399b4 100644 --- a/engine/src/flutter/common/settings.h +++ b/engine/src/flutter/common/settings.h @@ -6,9 +6,9 @@ #define FLUTTER_COMMON_SETTINGS_H_ #include -#include #include +#include #include #include #include diff --git a/engine/src/flutter/examples/glfw/FlutterEmbedderGLFW.cc b/engine/src/flutter/examples/glfw/FlutterEmbedderGLFW.cc index 5389fb298d..4dfffad4e6 100644 --- a/engine/src/flutter/examples/glfw/FlutterEmbedderGLFW.cc +++ b/engine/src/flutter/examples/glfw/FlutterEmbedderGLFW.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include #include #include +#include #include #include diff --git a/engine/src/flutter/flow/layers/layer_tree.h b/engine/src/flutter/flow/layers/layer_tree.h index 81423c353d..b9cd8d37de 100644 --- a/engine/src/flutter/flow/layers/layer_tree.h +++ b/engine/src/flutter/flow/layers/layer_tree.h @@ -5,8 +5,7 @@ #ifndef FLUTTER_FLOW_LAYERS_LAYER_TREE_H_ #define FLUTTER_FLOW_LAYERS_LAYER_TREE_H_ -#include - +#include #include #include "flutter/flow/compositor_context.h" diff --git a/engine/src/flutter/flow/matrix_decomposition_unittests.cc b/engine/src/flutter/flow/matrix_decomposition_unittests.cc index dc95033e43..df37648136 100644 --- a/engine/src/flutter/flow/matrix_decomposition_unittests.cc +++ b/engine/src/flutter/flow/matrix_decomposition_unittests.cc @@ -2,11 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/fml/build_config.h" - -#if defined(OS_WIN) #define _USE_MATH_DEFINES -#endif + #include #include "flutter/flow/matrix_decomposition.h" diff --git a/engine/src/flutter/fml/command_line.h b/engine/src/flutter/fml/command_line.h index 3c880e4b8a..3f3467d40d 100644 --- a/engine/src/flutter/fml/command_line.h +++ b/engine/src/flutter/fml/command_line.h @@ -36,8 +36,7 @@ #ifndef LIB_FML_COMMAND_LINE_H_ #define LIB_FML_COMMAND_LINE_H_ -#include - +#include #include #include #include diff --git a/engine/src/flutter/fml/log_settings.cc b/engine/src/flutter/fml/log_settings.cc index 057de5351e..aa1e54e36f 100644 --- a/engine/src/flutter/fml/log_settings.cc +++ b/engine/src/flutter/fml/log_settings.cc @@ -5,9 +5,9 @@ #include "flutter/fml/log_settings.h" #include -#include #include +#include #include #include "flutter/fml/logging.h" diff --git a/engine/src/flutter/fml/platform/android/scoped_java_ref.h b/engine/src/flutter/fml/platform/android/scoped_java_ref.h index 7fe8828e21..2f0bb647a7 100644 --- a/engine/src/flutter/fml/platform/android/scoped_java_ref.h +++ b/engine/src/flutter/fml/platform/android/scoped_java_ref.h @@ -6,7 +6,8 @@ #define FLUTTER_FML_PLATFORM_ANDROID_SCOPED_JAVA_REF_H_ #include -#include + +#include #include "flutter/fml/macros.h" diff --git a/engine/src/flutter/fml/platform/posix/paths_posix.cc b/engine/src/flutter/fml/platform/posix/paths_posix.cc index 5defe8b948..83a8607e69 100644 --- a/engine/src/flutter/fml/platform/posix/paths_posix.cc +++ b/engine/src/flutter/fml/platform/posix/paths_posix.cc @@ -4,9 +4,10 @@ #include "flutter/fml/paths.h" -#include #include +#include + #include "flutter/fml/logging.h" namespace fml { diff --git a/engine/src/flutter/fml/platform/posix/posix_wrappers_posix.cc b/engine/src/flutter/fml/platform/posix/posix_wrappers_posix.cc index a161ad03e0..0c9a321022 100644 --- a/engine/src/flutter/fml/platform/posix/posix_wrappers_posix.cc +++ b/engine/src/flutter/fml/platform/posix/posix_wrappers_posix.cc @@ -4,7 +4,7 @@ #include "flutter/fml/posix_wrappers.h" -#include +#include namespace fml { diff --git a/engine/src/flutter/fml/platform/win/file_win.cc b/engine/src/flutter/fml/platform/win/file_win.cc index 0b52c37fa6..2815584ae4 100644 --- a/engine/src/flutter/fml/platform/win/file_win.cc +++ b/engine/src/flutter/fml/platform/win/file_win.cc @@ -7,9 +7,10 @@ #include #include #include -#include #include +#include +#include #include #include "flutter/fml/build_config.h" diff --git a/engine/src/flutter/fml/platform/win/posix_wrappers_win.cc b/engine/src/flutter/fml/platform/win/posix_wrappers_win.cc index ac674ddffe..cb788846e2 100644 --- a/engine/src/flutter/fml/platform/win/posix_wrappers_win.cc +++ b/engine/src/flutter/fml/platform/win/posix_wrappers_win.cc @@ -4,7 +4,7 @@ #include "flutter/fml/posix_wrappers.h" -#include +#include namespace fml { diff --git a/engine/src/flutter/fml/synchronization/waitable_event.cc b/engine/src/flutter/fml/synchronization/waitable_event.cc index cc2753ae0b..b912bf509d 100644 --- a/engine/src/flutter/fml/synchronization/waitable_event.cc +++ b/engine/src/flutter/fml/synchronization/waitable_event.cc @@ -4,13 +4,13 @@ #include "flutter/fml/synchronization/waitable_event.h" +#include +#include + #include "flutter/fml/logging.h" #include "flutter/fml/time/time_delta.h" #include "flutter/fml/time/time_point.h" -#include -#include - namespace fml { // Waits with a timeout on |condition()|. Returns true on timeout, or false if diff --git a/engine/src/flutter/fml/synchronization/waitable_event_unittest.cc b/engine/src/flutter/fml/synchronization/waitable_event_unittest.cc index 63bcd5fd01..dde70ad598 100644 --- a/engine/src/flutter/fml/synchronization/waitable_event_unittest.cc +++ b/engine/src/flutter/fml/synchronization/waitable_event_unittest.cc @@ -4,11 +4,10 @@ #include "flutter/fml/synchronization/waitable_event.h" -#include -#include -#include - #include +#include +#include +#include #include #include #include diff --git a/engine/src/flutter/fml/time/time_delta.h b/engine/src/flutter/fml/time/time_delta.h index e54a1f8bf9..0ebfa02d0e 100644 --- a/engine/src/flutter/fml/time/time_delta.h +++ b/engine/src/flutter/fml/time/time_delta.h @@ -5,10 +5,9 @@ #ifndef FLUTTER_FML_TIME_TIME_DELTA_H_ #define FLUTTER_FML_TIME_TIME_DELTA_H_ -#include -#include - #include +#include +#include #include #include diff --git a/engine/src/flutter/fml/time/time_point.h b/engine/src/flutter/fml/time/time_point.h index 4b6e44429f..a8c65121e9 100644 --- a/engine/src/flutter/fml/time/time_point.h +++ b/engine/src/flutter/fml/time/time_point.h @@ -5,8 +5,7 @@ #ifndef FLUTTER_FML_TIME_TIME_POINT_H_ #define FLUTTER_FML_TIME_TIME_POINT_H_ -#include - +#include #include #include "flutter/fml/time/time_delta.h" diff --git a/engine/src/flutter/lib/ui/compositing/scene.h b/engine/src/flutter/lib/ui/compositing/scene.h index d46ca5d3d4..f7a8d93711 100644 --- a/engine/src/flutter/lib/ui/compositing/scene.h +++ b/engine/src/flutter/lib/ui/compositing/scene.h @@ -5,7 +5,7 @@ #ifndef FLUTTER_LIB_UI_COMPOSITING_SCENE_H_ #define FLUTTER_LIB_UI_COMPOSITING_SCENE_H_ -#include +#include #include #include "flutter/flow/layers/layer_tree.h" diff --git a/engine/src/flutter/lib/ui/compositing/scene_builder.h b/engine/src/flutter/lib/ui/compositing/scene_builder.h index 1a2725442d..37f229429e 100644 --- a/engine/src/flutter/lib/ui/compositing/scene_builder.h +++ b/engine/src/flutter/lib/ui/compositing/scene_builder.h @@ -5,8 +5,7 @@ #ifndef FLUTTER_LIB_UI_COMPOSITING_SCENE_BUILDER_H_ #define FLUTTER_LIB_UI_COMPOSITING_SCENE_BUILDER_H_ -#include - +#include #include #include diff --git a/engine/src/flutter/lib/ui/compositing/scene_host.h b/engine/src/flutter/lib/ui/compositing/scene_host.h index 3518323112..9283ad40d6 100644 --- a/engine/src/flutter/lib/ui/compositing/scene_host.h +++ b/engine/src/flutter/lib/ui/compositing/scene_host.h @@ -6,15 +6,16 @@ #define FLUTTER_LIB_UI_COMPOSITING_SCENE_HOST_H_ #include -#include #include -#include "third_party/tonic/dart_library_natives.h" -#include "third_party/tonic/dart_persistent_value.h" + +#include #include "dart-pkg/zircon/sdk_ext/handle.h" #include "flutter/fml/memory/ref_counted.h" #include "flutter/fml/task_runner.h" #include "flutter/lib/ui/dart_wrapper.h" +#include "third_party/tonic/dart_library_natives.h" +#include "third_party/tonic/dart_persistent_value.h" namespace flutter { diff --git a/engine/src/flutter/lib/ui/dart_runtime_hooks.cc b/engine/src/flutter/lib/ui/dart_runtime_hooks.cc index 945833981c..3512f9b446 100644 --- a/engine/src/flutter/lib/ui/dart_runtime_hooks.cc +++ b/engine/src/flutter/lib/ui/dart_runtime_hooks.cc @@ -4,10 +4,9 @@ #include "flutter/lib/ui/dart_runtime_hooks.h" -#include -#include -#include - +#include +#include +#include #include #include diff --git a/engine/src/flutter/lib/ui/painting/canvas.cc b/engine/src/flutter/lib/ui/painting/canvas.cc index 913730da65..c066ee3cf7 100644 --- a/engine/src/flutter/lib/ui/painting/canvas.cc +++ b/engine/src/flutter/lib/ui/painting/canvas.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#define _USE_MATH_DEFINES + #include "flutter/lib/ui/painting/canvas.h" -#define _USE_MATH_DEFINES -#include +#include #include "flutter/flow/layers/physical_shape_layer.h" #include "flutter/lib/ui/painting/image.h" diff --git a/engine/src/flutter/lib/ui/painting/path.cc b/engine/src/flutter/lib/ui/painting/path.cc index 21bce8634d..b4b7ab55af 100644 --- a/engine/src/flutter/lib/ui/painting/path.cc +++ b/engine/src/flutter/lib/ui/painting/path.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#define _USE_MATH_DEFINES + #include "flutter/lib/ui/painting/path.h" -#define _USE_MATH_DEFINES -#include +#include #include "flutter/lib/ui/painting/matrix.h" #include "flutter/lib/ui/ui_dart_state.h" diff --git a/engine/src/flutter/lib/ui/painting/path_measure.cc b/engine/src/flutter/lib/ui/painting/path_measure.cc index da8c1659ec..16d3de0219 100644 --- a/engine/src/flutter/lib/ui/painting/path_measure.cc +++ b/engine/src/flutter/lib/ui/painting/path_measure.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#define _USE_MATH_DEFINES + #include "flutter/lib/ui/painting/path_measure.h" -#define _USE_MATH_DEFINES -#include +#include #include "flutter/lib/ui/painting/matrix.h" #include "flutter/lib/ui/ui_dart_state.h" diff --git a/engine/src/flutter/lib/ui/semantics/semantics_node.cc b/engine/src/flutter/lib/ui/semantics/semantics_node.cc index 5e26726989..5e05a7df9b 100644 --- a/engine/src/flutter/lib/ui/semantics/semantics_node.cc +++ b/engine/src/flutter/lib/ui/semantics/semantics_node.cc @@ -4,7 +4,7 @@ #include "flutter/lib/ui/semantics/semantics_node.h" -#include +#include namespace flutter { diff --git a/engine/src/flutter/lib/ui/semantics/semantics_node.h b/engine/src/flutter/lib/ui/semantics/semantics_node.h index cc98c8656a..b67f9a0d81 100644 --- a/engine/src/flutter/lib/ui/semantics/semantics_node.h +++ b/engine/src/flutter/lib/ui/semantics/semantics_node.h @@ -5,8 +5,7 @@ #ifndef FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_NODE_H_ #define FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_NODE_H_ -#include - +#include #include #include #include diff --git a/engine/src/flutter/lib/ui/window/pointer_data.cc b/engine/src/flutter/lib/ui/window/pointer_data.cc index a3292d486b..d628ca7015 100644 --- a/engine/src/flutter/lib/ui/window/pointer_data.cc +++ b/engine/src/flutter/lib/ui/window/pointer_data.cc @@ -4,7 +4,7 @@ #include "flutter/lib/ui/window/pointer_data.h" -#include +#include namespace flutter { diff --git a/engine/src/flutter/lib/ui/window/pointer_data.h b/engine/src/flutter/lib/ui/window/pointer_data.h index 124f35e94e..216cf755ea 100644 --- a/engine/src/flutter/lib/ui/window/pointer_data.h +++ b/engine/src/flutter/lib/ui/window/pointer_data.h @@ -5,7 +5,7 @@ #ifndef FLUTTER_LIB_UI_WINDOW_POINTER_DATA_H_ #define FLUTTER_LIB_UI_WINDOW_POINTER_DATA_H_ -#include +#include namespace flutter { diff --git a/engine/src/flutter/lib/ui/window/pointer_data_packet.cc b/engine/src/flutter/lib/ui/window/pointer_data_packet.cc index a9680dd9bb..facdd36798 100644 --- a/engine/src/flutter/lib/ui/window/pointer_data_packet.cc +++ b/engine/src/flutter/lib/ui/window/pointer_data_packet.cc @@ -4,7 +4,7 @@ #include "flutter/lib/ui/window/pointer_data_packet.h" -#include +#include namespace flutter { diff --git a/engine/src/flutter/lib/ui/window/pointer_data_packet.h b/engine/src/flutter/lib/ui/window/pointer_data_packet.h index 77fd9e605d..c7e1066958 100644 --- a/engine/src/flutter/lib/ui/window/pointer_data_packet.h +++ b/engine/src/flutter/lib/ui/window/pointer_data_packet.h @@ -5,8 +5,7 @@ #ifndef FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_ #define FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_ -#include - +#include #include #include "flutter/fml/macros.h" diff --git a/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.cc b/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.cc index b945e7b146..c9cf2b9ece 100644 --- a/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.cc +++ b/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.cc @@ -3,9 +3,10 @@ // found in the LICENSE file. #include "flutter/lib/ui/window/pointer_data_packet_converter.h" -#include "flutter/fml/logging.h" -#include +#include + +#include "flutter/fml/logging.h" namespace flutter { diff --git a/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.h b/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.h index 29024d07fb..67b19d164a 100644 --- a/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.h +++ b/engine/src/flutter/lib/ui/window/pointer_data_packet_converter.h @@ -5,8 +5,7 @@ #ifndef FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_CONVERTER_H_ #define FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_CONVERTER_H_ -#include - +#include #include #include #include diff --git a/engine/src/flutter/runtime/dart_service_isolate.cc b/engine/src/flutter/runtime/dart_service_isolate.cc index 9c1bbce2b0..2fb9932e4e 100644 --- a/engine/src/flutter/runtime/dart_service_isolate.cc +++ b/engine/src/flutter/runtime/dart_service_isolate.cc @@ -4,8 +4,8 @@ #include "flutter/runtime/dart_service_isolate.h" -#include #include +#include #include "flutter/fml/logging.h" #include "flutter/fml/posix_wrappers.h" diff --git a/engine/src/flutter/runtime/embedder_resources.cc b/engine/src/flutter/runtime/embedder_resources.cc index 2b2f84318f..1f4db6ee13 100644 --- a/engine/src/flutter/runtime/embedder_resources.cc +++ b/engine/src/flutter/runtime/embedder_resources.cc @@ -4,7 +4,7 @@ #include "flutter/runtime/embedder_resources.h" -#include +#include #include "flutter/fml/logging.h" diff --git a/engine/src/flutter/runtime/service_protocol.cc b/engine/src/flutter/runtime/service_protocol.cc index ace3039f2f..f468d097d9 100644 --- a/engine/src/flutter/runtime/service_protocol.cc +++ b/engine/src/flutter/runtime/service_protocol.cc @@ -6,8 +6,7 @@ #include "flutter/runtime/service_protocol.h" -#include - +#include #include #include #include diff --git a/engine/src/flutter/shell/common/engine_unittests.cc b/engine/src/flutter/shell/common/engine_unittests.cc index 54f6f00d7a..3390507f68 100644 --- a/engine/src/flutter/shell/common/engine_unittests.cc +++ b/engine/src/flutter/shell/common/engine_unittests.cc @@ -3,8 +3,11 @@ // found in the LICENSE file. // FLUTTER_NOLINT -#include "flutter/runtime/dart_vm_lifecycle.h" #include "flutter/shell/common/engine.h" + +#include + +#include "flutter/runtime/dart_vm_lifecycle.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" #include "gmock/gmock.h" diff --git a/engine/src/flutter/shell/common/shell_unittests.cc b/engine/src/flutter/shell/common/shell_unittests.cc index c348b0e071..c6351316ad 100644 --- a/engine/src/flutter/shell/common/shell_unittests.cc +++ b/engine/src/flutter/shell/common/shell_unittests.cc @@ -5,8 +5,8 @@ #define FML_USED_ON_EMBEDDER -#include #include +#include #include #include #include diff --git a/engine/src/flutter/shell/platform/common/cpp/client_wrapper/core_implementations.cc b/engine/src/flutter/shell/platform/common/cpp/client_wrapper/core_implementations.cc index 2cafc7f9fe..21136fdb40 100644 --- a/engine/src/flutter/shell/platform/common/cpp/client_wrapper/core_implementations.cc +++ b/engine/src/flutter/shell/platform/common/cpp/client_wrapper/core_implementations.cc @@ -13,8 +13,7 @@ // removed in favor of the normal structure since templates will no longer // manually include files. -#include - +#include #include #include "binary_messenger_impl.h" diff --git a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/fuchsia/sdk_ext/fuchsia.cc b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/fuchsia/sdk_ext/fuchsia.cc index 3c7194df29..2857a5a7c3 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/fuchsia/sdk_ext/fuchsia.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/fuchsia/sdk_ext/fuchsia.cc @@ -6,9 +6,8 @@ #include -#include -#include - +#include +#include #include #include diff --git a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/natives.cc b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/natives.cc index 30c18051b9..3c2f6d54a4 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/natives.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/natives.cc @@ -6,9 +6,7 @@ #include -#include -#include - +#include #include #include diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc index 0bc7d532ed..959803f5a8 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc @@ -4,13 +4,14 @@ #include "dart_runner.h" -#include #include #include #include #include #include #include + +#include #include #include #include diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.h b/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.h index 72740a7a54..44a890124c 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.h +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include +#include namespace dart_runner { diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/runner.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/runner.cc index 7057600d7a..1e8e26dfbf 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/runner.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/runner.cc @@ -4,14 +4,14 @@ #include "runner.h" +#include #include #include #include #include #include -#include -#include +#include #include #include diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/thread.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/thread.cc index f15ea309a2..c0c68e86e2 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/thread.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/thread.cc @@ -4,12 +4,11 @@ #include "thread.h" -#include +#include #include #include - -#include +#include #include "flutter/fml/logging.h" #include "loop.h" diff --git a/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/files.cc b/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/files.cc index fb1613de0e..c0223bd81d 100644 --- a/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/files.cc +++ b/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/files.cc @@ -5,7 +5,8 @@ #include "files.h" #include -#include + +#include #include "inlines.h" #include "logging.h" diff --git a/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc b/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc index c8f3da68bd..77692914be 100644 --- a/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc +++ b/engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/vmservice_object.cc @@ -5,13 +5,13 @@ #include "vmservice_object.h" #include -#include -#include - #include #include #include +#include +#include + #include "logging.h" namespace { diff --git a/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc b/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc index e34d706741..703048a462 100644 --- a/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc +++ b/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc @@ -6,9 +6,9 @@ #include "flutter/shell/platform/glfw/public/flutter_glfw.h" #include -#include #include +#include #include #include #include diff --git a/engine/src/flutter/shell/platform/linux/fl_json_message_codec_test.cc b/engine/src/flutter/shell/platform/linux/fl_json_message_codec_test.cc index 2c9a363a12..bfa6f3e686 100644 --- a/engine/src/flutter/shell/platform/linux/fl_json_message_codec_test.cc +++ b/engine/src/flutter/shell/platform/linux/fl_json_message_codec_test.cc @@ -5,7 +5,7 @@ #include "flutter/shell/platform/linux/public/flutter_linux/fl_json_message_codec.h" #include "gtest/gtest.h" -#include +#include // Encodes a message using FlJsonMessageCodec to a UTF-8 string. static gchar* encode_message(FlValue* value) { @@ -558,10 +558,11 @@ TEST(FlJsonMessageCodecTest, EncodeListNested) { g_autoptr(FlValue) even_numbers = fl_value_new_list(); g_autoptr(FlValue) odd_numbers = fl_value_new_list(); for (int i = 0; i < 10; i++) { - if (i % 2 == 0) + if (i % 2 == 0) { fl_value_append_take(even_numbers, fl_value_new_int(i)); - else + } else { fl_value_append_take(odd_numbers, fl_value_new_int(i)); + } } g_autoptr(FlValue) value = fl_value_new_list(); fl_value_append(value, even_numbers); diff --git a/engine/src/flutter/shell/platform/linux/testing/mock_engine.cc b/engine/src/flutter/shell/platform/linux/testing/mock_engine.cc index 75c12a84b9..c32d0b1381 100644 --- a/engine/src/flutter/shell/platform/linux/testing/mock_engine.cc +++ b/engine/src/flutter/shell/platform/linux/testing/mock_engine.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include "flutter/shell/platform/embedder/embedder.h" #include "flutter/shell/platform/linux/fl_method_codec_private.h" #include "flutter/shell/platform/linux/public/flutter_linux/fl_method_response.h" #include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_method_codec.h" #include "gtest/gtest.h" -#include - struct _FlutterEngine { bool running; FlutterPlatformMessageCallback platform_message_callback; diff --git a/engine/src/flutter/shell/platform/windows/flutter_windows.cc b/engine/src/flutter/shell/platform/windows/flutter_windows.cc index 65a0268812..f15cd7ab91 100644 --- a/engine/src/flutter/shell/platform/windows/flutter_windows.cc +++ b/engine/src/flutter/shell/platform/windows/flutter_windows.cc @@ -4,10 +4,10 @@ #include "flutter/shell/platform/windows/public/flutter_windows.h" -#include #include #include +#include #include #include #include diff --git a/engine/src/flutter/shell/platform/windows/system_utils_unittests.cc b/engine/src/flutter/shell/platform/windows/system_utils_unittests.cc index d784d50276..148ee85890 100644 --- a/engine/src/flutter/shell/platform/windows/system_utils_unittests.cc +++ b/engine/src/flutter/shell/platform/windows/system_utils_unittests.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include +#include #include "flutter/shell/platform/windows/system_utils.h" #include "gtest/gtest.h" diff --git a/engine/src/flutter/third_party/tonic/dart_list.h b/engine/src/flutter/third_party/tonic/dart_list.h index fbfc152d90..57c5347a8e 100644 --- a/engine/src/flutter/third_party/tonic/dart_list.h +++ b/engine/src/flutter/third_party/tonic/dart_list.h @@ -5,7 +5,7 @@ #ifndef LIB_TONIC_DART_LIST_H_ #define LIB_TONIC_DART_LIST_H_ -#include +#include #include "third_party/dart/runtime/include/dart_api.h" #include "tonic/converter/dart_converter.h" diff --git a/engine/src/flutter/third_party/tonic/file_loader/file_loader_fuchsia.cc b/engine/src/flutter/third_party/tonic/file_loader/file_loader_fuchsia.cc index 808dccdb31..794a298b49 100644 --- a/engine/src/flutter/third_party/tonic/file_loader/file_loader_fuchsia.cc +++ b/engine/src/flutter/third_party/tonic/file_loader/file_loader_fuchsia.cc @@ -5,10 +5,10 @@ #include "tonic/file_loader/file_loader.h" #include -#include #include #include +#include #include #include #include diff --git a/engine/src/flutter/third_party/tonic/filesystem/filesystem/eintr_wrapper.h b/engine/src/flutter/third_party/tonic/filesystem/filesystem/eintr_wrapper.h index 183c813d01..4d92d4bcb4 100644 --- a/engine/src/flutter/third_party/tonic/filesystem/filesystem/eintr_wrapper.h +++ b/engine/src/flutter/third_party/tonic/filesystem/filesystem/eintr_wrapper.h @@ -5,7 +5,7 @@ #ifndef FILESYSTEM_EINTR_WRAPPER_H_ #define FILESYSTEM_EINTR_WRAPPER_H_ -#include +#include #include "tonic/common/build_config.h" diff --git a/engine/src/flutter/third_party/tonic/filesystem/filesystem/file.cc b/engine/src/flutter/third_party/tonic/filesystem/filesystem/file.cc index 53e8e053af..0bc6eed02b 100644 --- a/engine/src/flutter/third_party/tonic/filesystem/filesystem/file.cc +++ b/engine/src/flutter/third_party/tonic/filesystem/filesystem/file.cc @@ -5,10 +5,11 @@ #include "filesystem/file.h" #include -#include -#include #include +#include +#include + #include "tonic/common/build_config.h" #if defined(OS_WIN) diff --git a/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_posix.cc b/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_posix.cc index 5c748251e4..ac4b6ac69b 100644 --- a/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_posix.cc +++ b/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_posix.cc @@ -5,14 +5,14 @@ #include "filesystem/path.h" #include -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include #include #include #include diff --git a/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_win.cc b/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_win.cc index 48edde610b..04a5e68102 100644 --- a/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_win.cc +++ b/engine/src/flutter/third_party/tonic/filesystem/filesystem/path_win.cc @@ -7,13 +7,13 @@ #include #include -#include #include -#include #include #include #include +#include +#include #include #include #include diff --git a/engine/src/flutter/third_party/txt/src/utils/TypeHelpers.h b/engine/src/flutter/third_party/txt/src/utils/TypeHelpers.h index d0935ad0fc..9bd10a4ee1 100644 --- a/engine/src/flutter/third_party/txt/src/utils/TypeHelpers.h +++ b/engine/src/flutter/third_party/txt/src/utils/TypeHelpers.h @@ -17,13 +17,13 @@ #ifndef ANDROID_TYPE_HELPERS_H #define ANDROID_TYPE_HELPERS_H +#include + +#include +#include #include #include -#include -#include -#include - // --------------------------------------------------------------------------- namespace android {