From 72d498ec4a996f365612d79a4641fef5f77f6f57 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Mon, 16 Aug 2021 09:21:59 +0200 Subject: [PATCH] TypeInfo_Class: Make 2 superfluously virtual functions final No idea what they are good for anyway; the `info` might be handy due to `TypeInfo_Interface` having a `TypeInfo_Class info` field. --- src/object.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/object.d b/src/object.d index acd8911cd8..2023c443d4 100644 --- a/src/object.d +++ b/src/object.d @@ -1401,14 +1401,14 @@ private extern (C) int _d_isbaseof(scope TypeInfo_Class child, */ class TypeInfo_Class : TypeInfo { - override string toString() const pure { return info.name; } + override string toString() const pure { return name; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Class)o; - return c && this.info.name == c.info.name; + return c && this.name == c.name; } override size_t getHash(scope const void* p) @trusted const @@ -1464,8 +1464,8 @@ class TypeInfo_Class : TypeInfo return m_offTi; } - @property auto info() @safe nothrow pure const return { return this; } - @property auto typeinfo() @safe nothrow pure const return { return this; } + final @property auto info() @safe @nogc nothrow pure const return { return this; } + final @property auto typeinfo() @safe @nogc nothrow pure const return { return this; } byte[] m_init; /** class static initializer * (init.length gives size in bytes of class)