From 16455a25431c2750efb3ce2208f0d0d26c762945 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 23 Jul 2024 16:50:58 -0700 Subject: [PATCH] [iOS] Mark EmbeddedViewCount const (flutter/engine#54062) Since this method isn't mutating the pool, we should mark it const. Cleanup spotted while working on https://github.com/flutter/engine/pull/54056. No test because no semantic change. The compiler is the test. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../darwin/ios/framework/Source/FlutterPlatformViews.mm | 2 +- .../darwin/ios/framework/Source/FlutterPlatformViews_Internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 551be716b1..c3c76ec82d 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -398,7 +398,7 @@ void FlutterPlatformViewsController::PrerollCompositeEmbeddedView( views_to_recomposite_.insert(view_id); } -size_t FlutterPlatformViewsController::EmbeddedViewCount() { +size_t FlutterPlatformViewsController::EmbeddedViewCount() const { return composition_order_.size(); } diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index 6373e1feaa..afda710e7f 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h @@ -234,7 +234,7 @@ class FlutterPlatformViewsController { void PrerollCompositeEmbeddedView(int64_t view_id, std::unique_ptr params); - size_t EmbeddedViewCount(); + size_t EmbeddedViewCount() const; // Returns the `FlutterPlatformView`'s `view` object associated with the view_id. //