Minor fixes for libstdc++ 15 (#178601)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*
This adds some includes and changes an API in an internal tool to use
`std::string` instead of `std::string_view` for a path, fixing builds
with libstdc++ 15

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This commit is contained in:
LN Liberda 2025-12-16 20:39:00 +01:00 committed by GitHub
parent 698615f942
commit bb91eec6eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 9 additions and 2 deletions

View File

@ -5,6 +5,7 @@
#ifndef FLUTTER_DISPLAY_LIST_DL_STORAGE_H_
#define FLUTTER_DISPLAY_LIST_DL_STORAGE_H_
#include <cstdint>
#include <memory>
#include "flutter/fml/logging.h"

View File

@ -5,6 +5,8 @@
#ifndef FLUTTER_DISPLAY_LIST_DL_TEXT_H_
#define FLUTTER_DISPLAY_LIST_DL_TEXT_H_
#include <memory>
#include "flutter/display_list/geometry/dl_geometry_types.h"
namespace impeller {

View File

@ -5,6 +5,7 @@
#ifndef FLUTTER_FML_SYNCHRONIZATION_SEMAPHORE_H_
#define FLUTTER_FML_SYNCHRONIZATION_SEMAPHORE_H_
#include <cstdint>
#include <memory>
#include "flutter/fml/macros.h"

View File

@ -5,6 +5,7 @@
#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_HANDLE_GLES_H_
#define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_HANDLE_GLES_H_
#include <cstdint>
#include <optional>
#include <sstream>
#include <string>

View File

@ -5,6 +5,7 @@
#ifndef FLUTTER_IMPELLER_TYPOGRAPHER_FONT_H_
#define FLUTTER_IMPELLER_TYPOGRAPHER_FONT_H_
#include <cstdint>
#include <memory>
#include "fml/hash_combine.h"

View File

@ -5,6 +5,7 @@
#ifndef FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_BINARY_MESSENGER_H_
#define FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_BINARY_MESSENGER_H_
#include <cstdint>
#include <functional>
#include <string>

View File

@ -6,7 +6,7 @@
#include <fstream>
#include "third_party/abseil-cpp/absl/strings/str_cat.h"
absl::StatusOr<Filter> Filter::Open(std::string_view path) {
absl::StatusOr<Filter> Filter::Open(const std::string& path) {
std::ifstream input;
input.open(path);
absl::StatusOr<Filter> result = Open(input);

View File

@ -16,7 +16,7 @@
/// This is used for things like the include.txt and exclude.txt.
class Filter {
public:
static absl::StatusOr<Filter> Open(std::string_view path);
static absl::StatusOr<Filter> Open(const std::string& path);
static absl::StatusOr<Filter> Open(std::istream& input);