Skip to content

Commit

Permalink
[skia] Fix build creating an instance of std::span for the StringView…
Browse files Browse the repository at this point in the history
… constructor

https://bugs.webkit.org/show_bug.cgi?id=273616

Reviewed by Alejandro G. Castro.

Fixes error: class template placeholder 'std::span' not permitted in this context

The StringView constructor is overloaded and there are several constructors that
could potentially take a std::span. The use of {} may not provide enough information
for the compiler to unambiguously choose a constructor.

The constructor of std::span explicitly makes it easier for the compiler to deduce
the template arguments correctly.

* Source/WebCore/platform/graphics/skia/GlyphPageSkia.cpp:
(WebCore::GlyphPage::fill):

Canonical link: https://commits.webkit.org/278451@main
  • Loading branch information
psaavedra committed May 7, 2024
1 parent 0e2f717 commit eac1ccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/platform/graphics/skia/GlyphPageSkia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool GlyphPage::fill(UChar* buffer, unsigned bufferLength)
if (!skiaHarfBuzzFont)
return false;

StringView stringView(std::span { buffer, bufferLength });
StringView stringView(std::span(buffer, bufferLength));
auto codePoints = stringView.codePoints();
auto codePointsIterator = codePoints.begin();

Expand Down

0 comments on commit eac1ccc

Please sign in to comment.