Codechange: Return read-only span instead of vector from layout run functions.

This commit is contained in:
Peter Nelson
2024-06-01 22:32:36 +01:00
committed by Peter Nelson
parent 6bf214af6e
commit bbbf2b5282
5 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -81,9 +81,9 @@ public:
CoreTextVisualRun(CTRunRef run, Font *font, const CoreTextParagraphLayoutFactory::CharType *buff);
CoreTextVisualRun(CoreTextVisualRun &&other) = default;
const std::vector<GlyphID> &GetGlyphs() const override { return this->glyphs; }
const std::vector<Point> &GetPositions() const override { return this->positions; }
const std::vector<int> &GetGlyphToCharMap() const override { return this->glyph_to_char; }
std::span<const GlyphID> GetGlyphs() const override { return this->glyphs; }
std::span<const Point> GetPositions() const override { return this->positions; }
std::span<const int> GetGlyphToCharMap() const override { return this->glyph_to_char; }
const Font *GetFont() const override { return this->font; }
int GetLeading() const override { return this->font->fc->GetHeight(); }