commit | dbeab2aa70875f30ebbcdcd3ad9b99a902ad0a0e | [log] [tgz] |
---|---|---|
author | Chris Bracken <chris@bracken.jp> | Tue Jul 23 16:50:58 2024 -0700 |
committer | GitHub <noreply@github.com> | Tue Jul 23 23:50:58 2024 +0000 |
tree | bc52c581ea6c7131bd4ff00ad10cb5252a07e0c0 | |
parent | 6486cbd130426a44576c3c7301d4fc5acaff25e8 [diff] |
[iOS] Mark EmbeddedViewCount const (#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
diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 551be71..c3c76ec 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm
@@ -398,7 +398,7 @@ views_to_recomposite_.insert(view_id); } -size_t FlutterPlatformViewsController::EmbeddedViewCount() { +size_t FlutterPlatformViewsController::EmbeddedViewCount() const { return composition_order_.size(); }
diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index 6373e1f..afda710 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h
@@ -234,7 +234,7 @@ void PrerollCompositeEmbeddedView(int64_t view_id, std::unique_ptr<flutter::EmbeddedViewParams> params); - size_t EmbeddedViewCount(); + size_t EmbeddedViewCount() const; // Returns the `FlutterPlatformView`'s `view` object associated with the view_id. //