summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-07-31 11:40:28 +0200
committerMurray Cumming <murrayc@murrayc.com>2015-07-31 11:40:28 +0200
commit89e0d60963fffb66cbc7ef34dbfd5fbdf26f81c2 (patch)
treeca019ec52f8812b4837358302257721ee88e5ac9 /examples
parenta5a7306e033ab41eecff31f885d9fa9c85e15cb4 (diff)
C++11: Use the override keyword.
Diffstat (limited to 'examples')
-rw-r--r--examples/text/user-font.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/text/user-font.cc b/examples/text/user-font.cc
index 7836f5b..851887f 100644
--- a/examples/text/user-font.cc
+++ b/examples/text/user-font.cc
@@ -39,10 +39,10 @@ public:
return Cairo::RefPtr<BoxFontFace>(new BoxFontFace());
}
- virtual Cairo::ErrorStatus
+ Cairo::ErrorStatus
init(const Cairo::RefPtr<Cairo::ScaledFont>& /*scaled_font*/,
const Cairo::RefPtr<Cairo::Context>& /*cr*/,
- Cairo::FontExtents &extents)
+ Cairo::FontExtents &extents) override
{
double max = 0;
for (unsigned int i = 0; i < sizeof (glyphs) / sizeof (GlyphBounds); ++i) {
@@ -55,9 +55,9 @@ public:
return CAIRO_STATUS_SUCCESS;
}
- virtual Cairo::ErrorStatus
+ Cairo::ErrorStatus
unicode_to_glyph (const Cairo::RefPtr<Cairo::ScaledFont>& /*scaled_font*/,
- unsigned long unicode, unsigned long& glyph)
+ unsigned long unicode, unsigned long& glyph) override
{
glyph = 0;
// yes this is a stupid an ineffienct way to do this but we only have a few
@@ -72,11 +72,11 @@ public:
return CAIRO_STATUS_SUCCESS;
}
- virtual Cairo::ErrorStatus
+ Cairo::ErrorStatus
render_glyph(const Cairo::RefPtr<Cairo::ScaledFont>& /*scaled_font*/,
unsigned long glyph,
const Cairo::RefPtr<Cairo::Context>& cr,
- Cairo::TextExtents& metrics)
+ Cairo::TextExtents& metrics) override
{
// check that the glyph is in our table
if (glyph >= 1 && glyph <= sizeof(glyphs)/sizeof(GlyphBounds)) {