From 54e53b326ef13ae61a140b541cea43c723d40606 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 27 Jan 2023 10:12:19 -0800 Subject: [PATCH] Fix for downstream C++20 compiler (flutter/engine#39197) --- engine/src/flutter/shell/platform/glfw/flutter_glfw.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc b/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc index 2509067a7c..d50871bd6f 100644 --- a/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc +++ b/engine/src/flutter/shell/platform/glfw/flutter_glfw.cc @@ -673,12 +673,12 @@ UniqueAotDataPtr LoadAotData(const std::filesystem::path& aot_data_path) { << std::endl; return nullptr; } + std::string path_string = aot_data_path.string(); if (!std::filesystem::exists(aot_data_path)) { - std::cerr << "Can't load AOT data from " << aot_data_path.string() - << "; no such file." << std::endl; + std::cerr << "Can't load AOT data from " << path_string << "; no such file." + << std::endl; return nullptr; } - std::string path_string = aot_data_path.u8string(); FlutterEngineAOTDataSource source = {}; source.type = kFlutterEngineAOTDataSourceTypeElfPath; source.elf_path = path_string.c_str(); @@ -757,8 +757,8 @@ static bool RunFlutterEngine( } FlutterProjectArgs args = {}; args.struct_size = sizeof(FlutterProjectArgs); - args.assets_path = assets_path.c_str(); - args.icu_data_path = icu_path.c_str(); + args.assets_path = assets_path.string().c_str(); + args.icu_data_path = icu_path.string().c_str(); args.command_line_argc = static_cast(argv.size()); args.command_line_argv = &argv[0]; args.platform_message_callback = EngineOnFlutterPlatformMessage;