mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-02-02 17:11:20 +01:00
Codechange: Return read-only span instead of vector from layout run functions.
This commit is contained in:
committed by
Peter Nelson
parent
6bf214af6e
commit
bbbf2b5282
@@ -49,10 +49,10 @@ public:
|
||||
FallbackVisualRun(Font *font, const char32_t *chars, int glyph_count, int char_offset, int x);
|
||||
const Font *GetFont() const override { return this->font; }
|
||||
int GetGlyphCount() const override { return static_cast<int>(this->glyphs.size()); }
|
||||
const std::vector<GlyphID> &GetGlyphs() const override { return this->glyphs; }
|
||||
const std::vector<Point> &GetPositions() const override { return this->positions; }
|
||||
std::span<const GlyphID> GetGlyphs() const override { return this->glyphs; }
|
||||
std::span<const Point> GetPositions() const override { return this->positions; }
|
||||
int GetLeading() const override { return this->GetFont()->fc->GetHeight(); }
|
||||
const std::vector<int> &GetGlyphToCharMap() const override { return this->glyph_to_char; }
|
||||
std::span<const int> GetGlyphToCharMap() const override { return this->glyph_to_char; }
|
||||
};
|
||||
|
||||
/** A single line worth of VisualRuns. */
|
||||
|
||||
Reference in New Issue
Block a user