summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/os')
-rw-r--r--src/os/macosx/string_osx.cpp28
-rw-r--r--src/os/macosx/string_osx.h8
-rw-r--r--src/os/windows/string_uniscribe.cpp30
-rw-r--r--src/os/windows/string_uniscribe.h8
4 files changed, 37 insertions, 37 deletions
diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp
index e14ca4183..f26421e36 100644
--- a/src/os/macosx/string_osx.cpp
+++ b/src/os/macosx/string_osx.cpp
@@ -54,13 +54,13 @@ public:
public:
CoreTextVisualRun(CTRunRef run, Font *font, const CoreTextParagraphLayoutFactory::CharType *buff);
- virtual const GlyphID *GetGlyphs() const { return &this->glyphs[0]; }
- virtual const float *GetPositions() const { return &this->positions[0]; }
- virtual const int *GetGlyphToCharMap() const { return &this->glyph_to_char[0]; }
+ const GlyphID *GetGlyphs() const override { return &this->glyphs[0]; }
+ const float *GetPositions() const override { return &this->positions[0]; }
+ const int *GetGlyphToCharMap() const override { return &this->glyph_to_char[0]; }
- virtual const Font *GetFont() const { return this->font; }
- virtual int GetLeading() const { return this->font->fc->GetHeight(); }
- virtual int GetGlyphCount() const { return (int)this->glyphs.size(); }
+ const Font *GetFont() const override { return this->font; }
+ int GetLeading() const override { return this->font->fc->GetHeight(); }
+ int GetGlyphCount() const override { return (int)this->glyphs.size(); }
int GetAdvance() const { return this->total_advance; }
};
@@ -83,12 +83,12 @@ public:
CFRelease(line);
}
- virtual int GetLeading() const;
- virtual int GetWidth() const;
- virtual int CountRuns() const { return this->size(); }
- virtual const VisualRun *GetVisualRun(int run) const { return this->at(run); }
+ int GetLeading() const override;
+ int GetWidth() const override;
+ int CountRuns() const override { return this->size(); }
+ const VisualRun *GetVisualRun(int run) const override { return this->at(run); }
- int GetInternalCharLength(WChar c) const
+ int GetInternalCharLength(WChar c) const override
{
/* CoreText uses UTF-16 internally which means we need to account for surrogate pairs. */
return c >= 0x010000U ? 2 : 1;
@@ -100,17 +100,17 @@ public:
this->Reflow();
}
- virtual ~CoreTextParagraphLayout()
+ ~CoreTextParagraphLayout() override
{
CFRelease(this->typesetter);
}
- virtual void Reflow()
+ void Reflow() override
{
this->cur_offset = 0;
}
- virtual const Line *NextLine(int max_width);
+ const Line *NextLine(int max_width) override;
};
diff --git a/src/os/macosx/string_osx.h b/src/os/macosx/string_osx.h
index d632b0a44..8c9b7058a 100644
--- a/src/os/macosx/string_osx.h
+++ b/src/os/macosx/string_osx.h
@@ -30,10 +30,10 @@ class OSXStringIterator : public StringIterator {
size_t cur_pos; ///< Current iteration position.
public:
- virtual void SetString(const char *s);
- virtual size_t SetCurPosition(size_t pos);
- virtual size_t Next(IterType what);
- virtual size_t Prev(IterType what);
+ void SetString(const char *s) override;
+ size_t SetCurPosition(size_t pos) override;
+ size_t Next(IterType what) override;
+ size_t Prev(IterType what) override;
static StringIterator *Create();
};
diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp
index 1d17b02d7..a5d03b948 100644
--- a/src/os/windows/string_uniscribe.cpp
+++ b/src/os/windows/string_uniscribe.cpp
@@ -90,30 +90,30 @@ public:
public:
UniscribeVisualRun(const UniscribeRun &range, int x);
- virtual ~UniscribeVisualRun()
+ ~UniscribeVisualRun() override
{
free(this->glyph_to_char);
}
- virtual const GlyphID *GetGlyphs() const { return &this->glyphs[0]; }
- virtual const float *GetPositions() const { return &this->positions[0]; }
- virtual const int *GetGlyphToCharMap() const;
+ const GlyphID *GetGlyphs() const override { return &this->glyphs[0]; }
+ const float *GetPositions() const override { return &this->positions[0]; }
+ const int *GetGlyphToCharMap() const override;
- virtual const Font *GetFont() const { return this->font; }
- virtual int GetLeading() const { return this->font->fc->GetHeight(); }
- virtual int GetGlyphCount() const { return this->num_glyphs; }
+ const Font *GetFont() const override { return this->font; }
+ int GetLeading() const override { return this->font->fc->GetHeight(); }
+ int GetGlyphCount() const override { return this->num_glyphs; }
int GetAdvance() const { return this->total_advance; }
};
/** A single line worth of VisualRuns. */
class UniscribeLine : public AutoDeleteSmallVector<UniscribeVisualRun *>, public ParagraphLayouter::Line {
public:
- virtual int GetLeading() const;
- virtual int GetWidth() const;
- virtual int CountRuns() const { return (uint)this->size(); }
- virtual const VisualRun *GetVisualRun(int run) const { return this->at(run); }
+ int GetLeading() const override;
+ int GetWidth() const override;
+ int CountRuns() const override { return (uint)this->size(); }
+ const VisualRun *GetVisualRun(int run) const override { return this->at(run); }
- int GetInternalCharLength(WChar c) const
+ int GetInternalCharLength(WChar c) const override
{
/* Uniscribe uses UTF-16 internally which means we need to account for surrogate pairs. */
return c >= 0x010000U ? 2 : 1;
@@ -125,15 +125,15 @@ public:
this->Reflow();
}
- virtual ~UniscribeParagraphLayout() {}
+ ~UniscribeParagraphLayout() override {}
- virtual void Reflow()
+ void Reflow() override
{
this->cur_range = this->ranges.begin();
this->cur_range_offset = 0;
}
- virtual const Line *NextLine(int max_width);
+ const Line *NextLine(int max_width) override;
};
void UniscribeResetScriptCache(FontSize size)
diff --git a/src/os/windows/string_uniscribe.h b/src/os/windows/string_uniscribe.h
index 6af858a88..49e1123a9 100644
--- a/src/os/windows/string_uniscribe.h
+++ b/src/os/windows/string_uniscribe.h
@@ -81,10 +81,10 @@ class UniscribeStringIterator : public StringIterator {
size_t cur_pos; ///< Current iteration position.
public:
- virtual void SetString(const char *s);
- virtual size_t SetCurPosition(size_t pos);
- virtual size_t Next(IterType what);
- virtual size_t Prev(IterType what);
+ void SetString(const char *s) override;
+ size_t SetCurPosition(size_t pos) override;
+ size_t Next(IterType what) override;
+ size_t Prev(IterType what) override;
};
#endif /* defined(WITH_UNISCRIBE) */