Turned on performance-move-const-arg everywhere. (flutter/engine#37482)

Turned on performance-move-const-arg everywhere.
This commit is contained in:
gaaclarke
2022-11-10 09:12:33 -08:00
committed by GitHub
parent a20cc51c95
commit 85a6c86d8f
4 changed files with 3 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ readability-identifier-naming,\
clang-diagnostic-*,\
google-objc-*,\
google-explicit-constructor,\
performance-move-const-arg,\
performance-unnecessary-value-param"
CheckOptions:

View File

@@ -32,9 +32,6 @@ SRC_DIR="$(cd "$SCRIPT_DIR/../.."; pwd -P)"
FLUTTER_DIR="$(cd "$SCRIPT_DIR/.."; pwd -P)"
DART_BIN="${SRC_DIR}/third_party/dart/tools/sdks/dart-sdk/bin"
DART="${DART_BIN}/dart"
# TODO(https://github.com/flutter/flutter/issues/113848): Migrate all platforms
# to have this as an error.
MAC_HOST_WARNINGS_AS_ERRORS="performance-move-const-arg"
# FLUTTER_LINT_PRINT_FIX will make it so that fix is executed and the generated
# diff is printed to stdout if clang-tidy fails. This is helpful for enabling
@@ -57,7 +54,6 @@ cd "$SCRIPT_DIR"
--disable-dart-dev \
"$SRC_DIR/flutter/tools/clang_tidy/bin/main.dart" \
--src-dir="$SRC_DIR" \
--mac-host-warnings-as-errors="$MAC_HOST_WARNINGS_AS_ERRORS" \
$fix_flag \
"$@" && true # errors ignored
clang_tidy_return=$?

View File

@@ -262,7 +262,7 @@ std::unique_ptr<PipelineCreateInfoVK> PipelineLibraryVK::CreatePipeline(
info.setPName("main");
info.setModule(
ShaderFunctionVK::Cast(entrypoint.second.get())->GetModule());
shader_stages.push_back(std::move(info));
shader_stages.push_back(info);
}
pipeline_info.setStages(shader_stages);

View File

@@ -734,8 +734,7 @@ std::shared_ptr<FlutterPlatformViewLayer> FlutterPlatformViewsController::GetLay
int64_t view_id,
int64_t overlay_id) {
FML_DCHECK(flutter_view_);
std::shared_ptr<FlutterPlatformViewLayer> layer =
layer_pool_->GetLayer(gr_context, std::move(ios_context));
std::shared_ptr<FlutterPlatformViewLayer> layer = layer_pool_->GetLayer(gr_context, ios_context);
UIView* overlay_view_wrapper = layer->overlay_view_wrapper.get();
auto screenScale = [UIScreen mainScreen].scale;