Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0039682

Browse files
author
George Wright
committed
Formatting
1 parent b174d63 commit 0039682

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

shell/platform/windows/client_wrapper/flutter_engine.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ FlutterEngine::FlutterEngine(const DartProject& project) {
2525
std::back_inserter(entrypoint_argv),
2626
[](const std::string& arg) -> const char* { return arg.c_str(); });
2727

28-
c_engine_properties.dart_entrypoint_argc = static_cast<int>(entrypoint_argv.size());
28+
c_engine_properties.dart_entrypoint_argc =
29+
static_cast<int>(entrypoint_argv.size());
2930
c_engine_properties.dart_entrypoint_argv =
3031
entrypoint_argv.size() > 0 ? entrypoint_argv.data() : nullptr;
3132

shell/platform/windows/client_wrapper/flutter_engine_unittests.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ class TestFlutterWindowsApi : public testing::StubFlutterWindowsApi {
5050

5151
bool reload_fonts_called() { return reload_fonts_called_; }
5252

53-
FlutterDesktopEngineProperties& engine_properties() { return engine_properties_; }
53+
FlutterDesktopEngineProperties& engine_properties() {
54+
return engine_properties_;
55+
}
5456

5557
private:
5658
bool create_called_ = false;
@@ -136,8 +138,10 @@ TEST(FlutterEngineTest, DartEntrypointArgs) {
136138
auto test_api = static_cast<TestFlutterWindowsApi*>(scoped_api_stub.stub());
137139

138140
FlutterEngine engine(project);
139-
EXPECT_TRUE(arguments[0] == test_api->engine_properties().dart_entrypoint_argv[0]);
140-
EXPECT_TRUE(arguments[1] == test_api->engine_properties().dart_entrypoint_argv[1]);
141+
EXPECT_TRUE(arguments[0] ==
142+
test_api->engine_properties().dart_entrypoint_argv[0]);
143+
EXPECT_TRUE(arguments[1] ==
144+
test_api->engine_properties().dart_entrypoint_argv[1]);
141145
EXPECT_EQ(2, test_api->engine_properties().dart_entrypoint_argc);
142146
}
143147

shell/platform/windows/flutter_project_bundle.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ FlutterProjectBundle::FlutterProjectBundle(
2121
}
2222

2323
for (int i = 0; i < properties.dart_entrypoint_argc; i++) {
24-
dart_entrypoint_arguments_.push_back(std::string(properties.dart_entrypoint_argv[i]));
24+
dart_entrypoint_arguments_.push_back(
25+
std::string(properties.dart_entrypoint_argv[i]));
2526
}
2627

2728
// Resolve any relative paths.

shell/platform/windows/flutter_project_bundle.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ class FlutterProjectBundle {
5151
// Logs and returns nullptr on failure.
5252
UniqueAotDataPtr LoadAotData();
5353

54-
// Returns the command line arguments to be passed through to the Dart entrypoint.
55-
const std::vector<std::string>& dart_entrypoint_arguments() const { return dart_entrypoint_arguments_; }
54+
// Returns the command line arguments to be passed through to the Dart
55+
// entrypoint.
56+
const std::vector<std::string>& dart_entrypoint_arguments() const {
57+
return dart_entrypoint_arguments_;
58+
}
5659

5760
private:
5861
std::filesystem::path assets_path_;

shell/platform/windows/flutter_windows_engine.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ bool FlutterWindowsEngine::RunWithEntrypoint(const char* entrypoint) {
143143
switches.begin(), switches.end(), std::back_inserter(argv),
144144
[](const std::string& arg) -> const char* { return arg.c_str(); });
145145

146-
const std::vector<std::string>& entrypoint_args = project_->dart_entrypoint_arguments();
146+
const std::vector<std::string>& entrypoint_args =
147+
project_->dart_entrypoint_arguments();
147148
std::vector<const char*> entrypoint_argv;
148149
std::transform(
149-
entrypoint_args.begin(), entrypoint_args.end(), std::back_inserter(entrypoint_argv),
150+
entrypoint_args.begin(), entrypoint_args.end(),
151+
std::back_inserter(entrypoint_argv),
150152
[](const std::string& arg) -> const char* { return arg.c_str(); });
151153

152154
// Configure task runners.
@@ -173,7 +175,8 @@ bool FlutterWindowsEngine::RunWithEntrypoint(const char* entrypoint) {
173175
args.command_line_argc = static_cast<int>(argv.size());
174176
args.command_line_argv = argv.size() > 0 ? argv.data() : nullptr;
175177
args.dart_entrypoint_argc = static_cast<int>(entrypoint_argv.size());
176-
args.dart_entrypoint_argv = entrypoint_argv.size() > 0 ? entrypoint_argv.data() : nullptr;
178+
args.dart_entrypoint_argv =
179+
entrypoint_argv.size() > 0 ? entrypoint_argv.data() : nullptr;
177180
args.platform_message_callback =
178181
[](const FlutterPlatformMessage* engine_message,
179182
void* user_data) -> void {

0 commit comments

Comments
 (0)