[pangomm] C++11: Mark all _CLASS_OPAQUE_REFCOUNTED classes as final.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm] C++11: Mark all _CLASS_OPAQUE_REFCOUNTED classes as final.
- Date: Sat, 22 Aug 2015 09:57:55 +0000 (UTC)
commit 704676e7f3b9835bb2b1866eb31625138b8759c7
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Aug 22 11:48:16 2015 +0200
C++11: Mark all _CLASS_OPAQUE_REFCOUNTED classes as final.
Because _CLASS_OPAQUE_REFCOUNTED already generates a comment
telling us not to derive from them, presumably because they can
only be instantiated by reinterpret_cast<>ing a base C struct.
Ideally, _CLASS_OPAQUE_REFCOUNTED would add the final keyword,
but the class line is is not generated, so that would be a little
difficult.
pango/src/coverage.hg | 2 +-
pango/src/layoutline.hg | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pango/src/coverage.hg b/pango/src/coverage.hg
index d74b6a0..747e8e6 100644
--- a/pango/src/coverage.hg
+++ b/pango/src/coverage.hg
@@ -35,7 +35,7 @@ _WRAP_ENUM(CoverageLevel, PangoCoverageLevel)
* It is often necessary in pango to determine if a particular font can represent a particular character,
* and also how well it can represent that character. Pango::Coverage holds this information.
*/
-class Coverage
+class Coverage final
{
_CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref,
pango_coverage_unref)
_IGNORE(pango_coverage_ref, pango_coverage_unref)
diff --git a/pango/src/layoutline.hg b/pango/src/layoutline.hg
index 38fce1a..c079b84 100644
--- a/pango/src/layoutline.hg
+++ b/pango/src/layoutline.hg
@@ -37,7 +37,7 @@ class Layout;
* and are only valid until the text, attributes, or settings of the parent Pango::Layout are modified.
* Routines for rendering Pango::Layout objects are provided in code specific to each rendering system.
*/
-class LayoutLine
+class LayoutLine final
{
_CLASS_OPAQUE_REFCOUNTED(LayoutLine, PangoLayoutLine, NONE, pango_layout_line_ref, pango_layout_line_unref)
_IGNORE(pango_layout_line_ref, pango_layout_line_unref)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]