diff --git a/engine/src/flutter/flow/display_list_utils.h b/engine/src/flutter/flow/display_list_utils.h index a8d0d6f88c..db03a56511 100644 --- a/engine/src/flutter/flow/display_list_utils.h +++ b/engine/src/flutter/flow/display_list_utils.h @@ -229,14 +229,18 @@ class BoundsAccumulator { public: void accumulate(const SkPoint& p) { accumulate(p.fX, p.fY); } void accumulate(SkScalar x, SkScalar y) { - if (min_x_ > x) + if (min_x_ > x) { min_x_ = x; - if (min_y_ > y) + } + if (min_y_ > y) { min_y_ = y; - if (max_x_ < x) + } + if (max_x_ < x) { max_x_ = x; - if (max_y_ < y) + } + if (max_y_ < y) { max_y_ = y; + } } void accumulate(const SkRect& r) { if (r.fLeft <= r.fRight && r.fTop <= r.fBottom) { diff --git a/engine/src/flutter/fml/command_line.h b/engine/src/flutter/fml/command_line.h index 3f3467d40d..75ec4fe7d7 100644 --- a/engine/src/flutter/fml/command_line.h +++ b/engine/src/flutter/fml/command_line.h @@ -182,13 +182,15 @@ inline CommandLine CommandLineFromIteratorsFindFirstPositionalArg( InputIterator first, InputIterator last, InputIterator* first_positional_arg) { - if (first_positional_arg) + if (first_positional_arg) { *first_positional_arg = last; + } internal::CommandLineBuilder builder; for (auto it = first; it < last; ++it) { if (builder.ProcessArg(*it)) { - if (first_positional_arg) + if (first_positional_arg) { *first_positional_arg = it; + } } } return builder.Build(); @@ -213,8 +215,9 @@ inline CommandLine CommandLineFromIteratorsWithArgv0(const std::string& argv0, InputIterator last) { internal::CommandLineBuilder builder; builder.ProcessArg(argv0); - for (auto it = first; it < last; ++it) + for (auto it = first; it < last; ++it) { builder.ProcessArg(*it); + } return builder.Build(); } diff --git a/engine/src/flutter/fml/memory/ref_counted.h b/engine/src/flutter/fml/memory/ref_counted.h index badb45d32b..6632aba5ab 100644 --- a/engine/src/flutter/fml/memory/ref_counted.h +++ b/engine/src/flutter/fml/memory/ref_counted.h @@ -69,8 +69,9 @@ class RefCountedThreadSafe : public internal::RefCountedThreadSafeBase { // Releases a reference to this object. This will destroy this object once the // last reference is released. void Release() const { - if (internal::RefCountedThreadSafeBase::Release()) + if (internal::RefCountedThreadSafeBase::Release()) { delete static_cast(this); + } } // Returns true if there is exactly one reference to this object. Use of this diff --git a/engine/src/flutter/fml/platform/darwin/scoped_block.h b/engine/src/flutter/fml/platform/darwin/scoped_block.h index 783767aaa5..d4a7e67051 100644 --- a/engine/src/flutter/fml/platform/darwin/scoped_block.h +++ b/engine/src/flutter/fml/platform/darwin/scoped_block.h @@ -30,18 +30,21 @@ class ScopedBlock { explicit ScopedBlock(B block = nullptr, OwnershipPolicy policy = OwnershipPolicy::Assume) : block_(block) { - if (block_ && policy == OwnershipPolicy::Retain) + if (block_ && policy == OwnershipPolicy::Retain) { block_ = Block_copy(block); + } } ScopedBlock(const ScopedBlock& that) : block_(that.block_) { - if (block_) + if (block_) { block_ = Block_copy(block_); + } } ~ScopedBlock() { - if (block_) + if (block_) { Block_release(block_); + } } ScopedBlock& operator=(const ScopedBlock& that) { @@ -51,10 +54,12 @@ class ScopedBlock { void reset(B block = nullptr, OwnershipPolicy policy = OwnershipPolicy::Assume) { - if (block && policy == OwnershipPolicy::Retain) + if (block && policy == OwnershipPolicy::Retain) { block = Block_copy(block); - if (block_) + } + if (block_) { Block_release(block_); + } block_ = block; } diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm index 0da6fa56ec..ac04c1183a 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm @@ -29,7 +29,7 @@ class MachThreads { FML_DISALLOW_COPY_AND_ASSIGN(MachThreads); }; -} +} // namespace namespace flutter { namespace { diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_switchable_gl_context.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_switchable_gl_context.mm index 895ce2128e..206bab2929 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_switchable_gl_context.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_switchable_gl_context.mm @@ -22,4 +22,4 @@ bool IOSSwitchableGLContext::RemoveCurrent() { FML_DCHECK_CREATION_THREAD_IS_CURRENT(checker); return [EAGLContext setCurrentContext:previous_context_]; }; -} +} // namespace flutter diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterFrameBufferProviderUnittests.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterFrameBufferProviderUnittests.mm index 5de56df9a7..38437c3a29 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterFrameBufferProviderUnittests.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterFrameBufferProviderUnittests.mm @@ -38,4 +38,4 @@ TEST(FlutterFrameBufferProviderTest, TestCreate) { EXPECT_TRUE(status == GL_FRAMEBUFFER_COMPLETE); } -} // flutter::testing +} // namespace flutter::testing diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterGLCompositorUnittests.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterGLCompositorUnittests.mm index 049c3ed7cd..e83ebb9b7c 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterGLCompositorUnittests.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterGLCompositorUnittests.mm @@ -26,4 +26,4 @@ TEST(FlutterGLCompositorTest, TestPresent) { ASSERT_TRUE(flag); } -} // flutter::testing +} // namespace flutter::testing diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositorUnittests.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositorUnittests.mm index 766acc6255..6d6ee12ea4 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositorUnittests.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositorUnittests.mm @@ -68,4 +68,4 @@ TEST(FlutterMetalCompositorTest, TestCompositing) { ASSERT_EQ(texture.height, 600u); } -} // flutter::testing +} // namespace flutter::testing