From affa4098baec3ee845017984a43d5d3cd87e46a0 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Mon, 12 Mar 2018 13:32:01 -0700 Subject: [PATCH] TypeInfo.getHash(): use const scope --- src/object.d | 26 +++++++++++++------------- src/rt/typeinfo/ti_Acdouble.d | 2 +- src/rt/typeinfo/ti_Acfloat.d | 2 +- src/rt/typeinfo/ti_Acreal.d | 2 +- src/rt/typeinfo/ti_Adouble.d | 2 +- src/rt/typeinfo/ti_Afloat.d | 2 +- src/rt/typeinfo/ti_Ag.d | 4 ++-- src/rt/typeinfo/ti_Aint.d | 2 +- src/rt/typeinfo/ti_Along.d | 2 +- src/rt/typeinfo/ti_Areal.d | 2 +- src/rt/typeinfo/ti_Ashort.d | 2 +- src/rt/typeinfo/ti_C.d | 2 +- src/rt/typeinfo/ti_byte.d | 2 +- src/rt/typeinfo/ti_cdouble.d | 2 +- src/rt/typeinfo/ti_cent.d | 2 +- src/rt/typeinfo/ti_cfloat.d | 2 +- src/rt/typeinfo/ti_char.d | 2 +- src/rt/typeinfo/ti_creal.d | 2 +- src/rt/typeinfo/ti_dchar.d | 2 +- src/rt/typeinfo/ti_delegate.d | 2 +- src/rt/typeinfo/ti_double.d | 2 +- src/rt/typeinfo/ti_float.d | 2 +- src/rt/typeinfo/ti_int.d | 2 +- src/rt/typeinfo/ti_long.d | 2 +- src/rt/typeinfo/ti_n.d | 2 +- src/rt/typeinfo/ti_ptr.d | 2 +- src/rt/typeinfo/ti_real.d | 2 +- src/rt/typeinfo/ti_short.d | 2 +- src/rt/typeinfo/ti_ubyte.d | 2 +- src/rt/typeinfo/ti_ucent.d | 2 +- src/rt/typeinfo/ti_uint.d | 2 +- src/rt/typeinfo/ti_ulong.d | 2 +- src/rt/typeinfo/ti_ushort.d | 2 +- src/rt/typeinfo/ti_void.d | 2 +- src/rt/typeinfo/ti_wchar.d | 2 +- 35 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/object.d b/src/object.d index 139c9f009f..a38850aeef 100644 --- a/src/object.d +++ b/src/object.d @@ -252,7 +252,7 @@ class TypeInfo * Bugs: * fix https://issues.dlang.org/show_bug.cgi?id=12516 e.g. by changing this to a truly safe interface. */ - size_t getHash(in void* p) @trusted nothrow const { return cast(size_t)p; } + size_t getHash(scope const void* p) @trusted nothrow const { return cast(size_t)p; } /// Compares two instances for equality. bool equals(in void* p1, in void* p2) const { return p1 == p2; } @@ -329,7 +329,7 @@ class TypeInfo_Enum : TypeInfo this.base == c.base; } - override size_t getHash(in void* p) const { return base.getHash(p); } + override size_t getHash(scope const void* p) const { return base.getHash(p); } override bool equals(in void* p1, in void* p2) const { return base.equals(p1, p2); } override int compare(in void* p1, in void* p2) const { return base.compare(p1, p2); } override @property size_t tsize() nothrow pure const { return base.tsize; } @@ -377,7 +377,7 @@ class TypeInfo_Pointer : TypeInfo return c && this.m_next == c.m_next; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return cast(size_t)*cast(void**)p; } @@ -432,7 +432,7 @@ class TypeInfo_Array : TypeInfo return c && this.value == c.value; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { void[] a = *cast(void[]*)p; return getArrayHash(value, a.ptr, a.length); @@ -529,7 +529,7 @@ class TypeInfo_StaticArray : TypeInfo this.value == c.value; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return getArrayHash(value, p, len); } @@ -655,7 +655,7 @@ class TypeInfo_AssociativeArray : TypeInfo return !!_aaEqual(this, *cast(const void**) p1, *cast(const void**) p2); } - override hash_t getHash(in void* p) nothrow @trusted const + override hash_t getHash(scope const void* p) nothrow @trusted const { return _aaGetHash(cast(void*)p, this); } @@ -702,7 +702,7 @@ class TypeInfo_Vector : TypeInfo return c && this.base == c.base; } - override size_t getHash(in void* p) const { return base.getHash(p); } + override size_t getHash(scope const void* p) const { return base.getHash(p); } override bool equals(in void* p1, in void* p2) const { return base.equals(p1, p2); } override int compare(in void* p1, in void* p2) const { return base.compare(p1, p2); } override @property size_t tsize() nothrow pure const { return base.tsize; } @@ -796,7 +796,7 @@ class TypeInfo_Delegate : TypeInfo return c && this.deco == c.deco; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return hashOf(*cast(void delegate()*)p); } @@ -896,7 +896,7 @@ class TypeInfo_Class : TypeInfo return c && this.info.name == c.info.name; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { auto o = *cast(Object*)p; return o ? o.toHash() : 0; @@ -1051,7 +1051,7 @@ class TypeInfo_Interface : TypeInfo return c && this.info.name == typeid(c).name; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { Interface* pi = **cast(Interface ***)*cast(void**)p; Object o = cast(Object)(*cast(void**)p - pi.offset); @@ -1121,7 +1121,7 @@ class TypeInfo_Struct : TypeInfo this.initializer().length == s.initializer().length; } - override size_t getHash(in void* p) @trusted pure nothrow const + override size_t getHash(scope const void* p) @trusted pure nothrow const { assert(p); if (xtoHash) @@ -1296,7 +1296,7 @@ class TypeInfo_Tuple : TypeInfo return false; } - override size_t getHash(in void* p) const + override size_t getHash(scope const void* p) const { assert(0); } @@ -1367,7 +1367,7 @@ class TypeInfo_Const : TypeInfo return base.opEquals(t.base); } - override size_t getHash(in void *p) const { return base.getHash(p); } + override size_t getHash(scope const void *p) const { return base.getHash(p); } override bool equals(in void *p1, in void *p2) const { return base.equals(p1, p2); } override int compare(in void *p1, in void *p2) const { return base.compare(p1, p2); } override @property size_t tsize() nothrow pure const { return base.tsize; } diff --git a/src/rt/typeinfo/ti_Acdouble.d b/src/rt/typeinfo/ti_Acdouble.d index 48107f9ab1..50debaca25 100644 --- a/src/rt/typeinfo/ti_Acdouble.d +++ b/src/rt/typeinfo/ti_Acdouble.d @@ -25,7 +25,7 @@ class TypeInfo_Ar : TypeInfo_Array override string toString() const { return (F[]).stringof; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return Array!F.hashOf(*cast(F[]*)p); } diff --git a/src/rt/typeinfo/ti_Acfloat.d b/src/rt/typeinfo/ti_Acfloat.d index 36db0225d6..dadec10df7 100644 --- a/src/rt/typeinfo/ti_Acfloat.d +++ b/src/rt/typeinfo/ti_Acfloat.d @@ -25,7 +25,7 @@ class TypeInfo_Aq : TypeInfo_Array override string toString() const { return (F[]).stringof; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return Array!F.hashOf(*cast(F[]*)p); } diff --git a/src/rt/typeinfo/ti_Acreal.d b/src/rt/typeinfo/ti_Acreal.d index 4473e126ce..650b89b4ed 100644 --- a/src/rt/typeinfo/ti_Acreal.d +++ b/src/rt/typeinfo/ti_Acreal.d @@ -25,7 +25,7 @@ class TypeInfo_Ac : TypeInfo_Array override string toString() const { return (F[]).stringof; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return Array!F.hashOf(*cast(F[]*)p); } diff --git a/src/rt/typeinfo/ti_Adouble.d b/src/rt/typeinfo/ti_Adouble.d index af458eeffc..9712f8a822 100644 --- a/src/rt/typeinfo/ti_Adouble.d +++ b/src/rt/typeinfo/ti_Adouble.d @@ -25,7 +25,7 @@ class TypeInfo_Ad : TypeInfo_Array override string toString() const { return (F[]).stringof; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return Array!F.hashOf(*cast(F[]*)p); } diff --git a/src/rt/typeinfo/ti_Afloat.d b/src/rt/typeinfo/ti_Afloat.d index 6c784fd4a6..9a95abd3b5 100644 --- a/src/rt/typeinfo/ti_Afloat.d +++ b/src/rt/typeinfo/ti_Afloat.d @@ -25,7 +25,7 @@ class TypeInfo_Af : TypeInfo_Array override string toString() const { return (F[]).stringof; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return Array!F.hashOf(*cast(F[]*)p); } diff --git a/src/rt/typeinfo/ti_Ag.d b/src/rt/typeinfo/ti_Ag.d index a1e449d4bb..e02dfa9125 100644 --- a/src/rt/typeinfo/ti_Ag.d +++ b/src/rt/typeinfo/ti_Ag.d @@ -25,7 +25,7 @@ class TypeInfo_Ag : TypeInfo_Array override string toString() const { return "byte[]"; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { const s = *cast(const void[]*)p; return rt.util.hash.hashOf(s, 0); @@ -118,7 +118,7 @@ class TypeInfo_Aa : TypeInfo_Ah { override string toString() const { return "char[]"; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { char[] s = *cast(char[]*)p; size_t hash = 0; diff --git a/src/rt/typeinfo/ti_Aint.d b/src/rt/typeinfo/ti_Aint.d index bb2929e8b3..43ee8d308b 100644 --- a/src/rt/typeinfo/ti_Aint.d +++ b/src/rt/typeinfo/ti_Aint.d @@ -26,7 +26,7 @@ class TypeInfo_Ai : TypeInfo_Array override string toString() const { return "int[]"; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { const s = *cast(const int[]*)p; return rt.util.hash.hashOf(s, 0); diff --git a/src/rt/typeinfo/ti_Along.d b/src/rt/typeinfo/ti_Along.d index c39bb2bd49..f76a677711 100644 --- a/src/rt/typeinfo/ti_Along.d +++ b/src/rt/typeinfo/ti_Along.d @@ -24,7 +24,7 @@ class TypeInfo_Al : TypeInfo_Array override string toString() const { return "long[]"; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { const s = *cast(const long[]*)p; return rt.util.hash.hashOf(s, 0); diff --git a/src/rt/typeinfo/ti_Areal.d b/src/rt/typeinfo/ti_Areal.d index 5c3ea41004..5280f81fe6 100644 --- a/src/rt/typeinfo/ti_Areal.d +++ b/src/rt/typeinfo/ti_Areal.d @@ -25,7 +25,7 @@ class TypeInfo_Ae : TypeInfo_Array override string toString() const { return (F[]).stringof; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { return Array!F.hashOf(*cast(F[]*)p); } diff --git a/src/rt/typeinfo/ti_Ashort.d b/src/rt/typeinfo/ti_Ashort.d index aebd3bec8e..abf69a5994 100644 --- a/src/rt/typeinfo/ti_Ashort.d +++ b/src/rt/typeinfo/ti_Ashort.d @@ -24,7 +24,7 @@ class TypeInfo_As : TypeInfo_Array override string toString() const { return "short[]"; } - override size_t getHash(in void* p) @trusted const + override size_t getHash(scope const void* p) @trusted const { const s = *cast(const short[]*)p; return rt.util.hash.hashOf(s, 0); diff --git a/src/rt/typeinfo/ti_C.d b/src/rt/typeinfo/ti_C.d index 19173d5f28..912774cb99 100644 --- a/src/rt/typeinfo/ti_C.d +++ b/src/rt/typeinfo/ti_C.d @@ -22,7 +22,7 @@ class TypeInfo_C : TypeInfo //pure: //nothrow: - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { Object o = *cast(Object*)p; return o ? o.toHash() : 0; diff --git a/src/rt/typeinfo/ti_byte.d b/src/rt/typeinfo/ti_byte.d index af763ca8cb..ba7fcc0641 100644 --- a/src/rt/typeinfo/ti_byte.d +++ b/src/rt/typeinfo/ti_byte.d @@ -24,7 +24,7 @@ class TypeInfo_g : TypeInfo override string toString() const pure nothrow @safe { return "byte"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(byte *)p; } diff --git a/src/rt/typeinfo/ti_cdouble.d b/src/rt/typeinfo/ti_cdouble.d index 426e585b0b..939edda579 100644 --- a/src/rt/typeinfo/ti_cdouble.d +++ b/src/rt/typeinfo/ti_cdouble.d @@ -27,7 +27,7 @@ class TypeInfo_r : TypeInfo override string toString() const { return F.stringof; } - override size_t getHash(in void* p) const @trusted + override size_t getHash(scope const void* p) const @trusted { return Floating!F.hashOf(*cast(F*)p); } diff --git a/src/rt/typeinfo/ti_cent.d b/src/rt/typeinfo/ti_cent.d index 5231765f3b..c38d908f48 100644 --- a/src/rt/typeinfo/ti_cent.d +++ b/src/rt/typeinfo/ti_cent.d @@ -28,7 +28,7 @@ class TypeInfo_zi : TypeInfo override string toString() const pure nothrow @safe { return "cent"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return rt.util.hash.hashOf(p[0 .. cent.sizeof], 0); } diff --git a/src/rt/typeinfo/ti_cfloat.d b/src/rt/typeinfo/ti_cfloat.d index cc5b2931dd..6c856310d6 100644 --- a/src/rt/typeinfo/ti_cfloat.d +++ b/src/rt/typeinfo/ti_cfloat.d @@ -27,7 +27,7 @@ class TypeInfo_q : TypeInfo override string toString() const { return F.stringof; } - override size_t getHash(in void* p) const @trusted + override size_t getHash(scope const void* p) const @trusted { return Floating!F.hashOf(*cast(F*)p); } diff --git a/src/rt/typeinfo/ti_char.d b/src/rt/typeinfo/ti_char.d index 8b68cb7bc3..2744a9f167 100644 --- a/src/rt/typeinfo/ti_char.d +++ b/src/rt/typeinfo/ti_char.d @@ -24,7 +24,7 @@ class TypeInfo_a : TypeInfo override string toString() const pure nothrow @safe { return "char"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(char *)p; } diff --git a/src/rt/typeinfo/ti_creal.d b/src/rt/typeinfo/ti_creal.d index 5a1579981a..5ed045d1ac 100644 --- a/src/rt/typeinfo/ti_creal.d +++ b/src/rt/typeinfo/ti_creal.d @@ -27,7 +27,7 @@ class TypeInfo_c : TypeInfo override string toString() const { return F.stringof; } - override size_t getHash(in void* p) const @trusted + override size_t getHash(scope const void* p) const @trusted { return Floating!F.hashOf(*cast(F*)p); } diff --git a/src/rt/typeinfo/ti_dchar.d b/src/rt/typeinfo/ti_dchar.d index ad5afaca24..2f0b8557c0 100644 --- a/src/rt/typeinfo/ti_dchar.d +++ b/src/rt/typeinfo/ti_dchar.d @@ -24,7 +24,7 @@ class TypeInfo_w : TypeInfo override string toString() const pure nothrow @safe { return "dchar"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(dchar *)p; } diff --git a/src/rt/typeinfo/ti_delegate.d b/src/rt/typeinfo/ti_delegate.d index 444e50a395..28dee5811a 100644 --- a/src/rt/typeinfo/ti_delegate.d +++ b/src/rt/typeinfo/ti_delegate.d @@ -26,7 +26,7 @@ class TypeInfo_D : TypeInfo pure: nothrow: - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return rt.util.hash.hashOf(p[0 .. dg.sizeof], 0); } diff --git a/src/rt/typeinfo/ti_double.d b/src/rt/typeinfo/ti_double.d index 421a19b22c..f9a95a6fff 100644 --- a/src/rt/typeinfo/ti_double.d +++ b/src/rt/typeinfo/ti_double.d @@ -27,7 +27,7 @@ class TypeInfo_d : TypeInfo override string toString() const { return F.stringof; } - override size_t getHash(in void* p) const @trusted + override size_t getHash(scope const void* p) const @trusted { return Floating!F.hashOf(*cast(F*)p); } diff --git a/src/rt/typeinfo/ti_float.d b/src/rt/typeinfo/ti_float.d index 27a54bc982..790d759fc0 100644 --- a/src/rt/typeinfo/ti_float.d +++ b/src/rt/typeinfo/ti_float.d @@ -27,7 +27,7 @@ class TypeInfo_f : TypeInfo override string toString() const { return F.stringof; } - override size_t getHash(in void* p) const @trusted + override size_t getHash(scope const void* p) const @trusted { return Floating!F.hashOf(*cast(F*)p); } diff --git a/src/rt/typeinfo/ti_int.d b/src/rt/typeinfo/ti_int.d index 1e21d8b515..5eb9ce6814 100644 --- a/src/rt/typeinfo/ti_int.d +++ b/src/rt/typeinfo/ti_int.d @@ -24,7 +24,7 @@ class TypeInfo_i : TypeInfo override string toString() const pure nothrow @safe { return "int"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(uint *)p; } diff --git a/src/rt/typeinfo/ti_long.d b/src/rt/typeinfo/ti_long.d index 6a16b1d3cc..ac41ecad5f 100644 --- a/src/rt/typeinfo/ti_long.d +++ b/src/rt/typeinfo/ti_long.d @@ -26,7 +26,7 @@ class TypeInfo_l : TypeInfo override string toString() const pure nothrow @safe { return "long"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return rt.util.hash.hashOf(p[0 .. long.sizeof], 0); } diff --git a/src/rt/typeinfo/ti_n.d b/src/rt/typeinfo/ti_n.d index b6a907d3ed..13f3acf7b9 100644 --- a/src/rt/typeinfo/ti_n.d +++ b/src/rt/typeinfo/ti_n.d @@ -19,7 +19,7 @@ class TypeInfo_n : TypeInfo { override string toString() const @safe { return "typeof(null)"; } - override size_t getHash(in void* p) const + override size_t getHash(scope const void* p) const { return 0; } diff --git a/src/rt/typeinfo/ti_ptr.d b/src/rt/typeinfo/ti_ptr.d index 7d4e069d90..1b88cdfc20 100644 --- a/src/rt/typeinfo/ti_ptr.d +++ b/src/rt/typeinfo/ti_ptr.d @@ -23,7 +23,7 @@ class TypeInfo_P : TypeInfo pure: nothrow: - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return cast(size_t)*cast(void**)p; } diff --git a/src/rt/typeinfo/ti_real.d b/src/rt/typeinfo/ti_real.d index 642f0da0a0..6ca240caeb 100644 --- a/src/rt/typeinfo/ti_real.d +++ b/src/rt/typeinfo/ti_real.d @@ -27,7 +27,7 @@ class TypeInfo_e : TypeInfo override string toString() const { return F.stringof; } - override size_t getHash(in void* p) const @trusted + override size_t getHash(scope const void* p) const @trusted { return Floating!F.hashOf(*cast(F*)p); } diff --git a/src/rt/typeinfo/ti_short.d b/src/rt/typeinfo/ti_short.d index 5928bc46c6..688025fec7 100644 --- a/src/rt/typeinfo/ti_short.d +++ b/src/rt/typeinfo/ti_short.d @@ -24,7 +24,7 @@ class TypeInfo_s : TypeInfo override string toString() const pure nothrow @safe { return "short"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(short *)p; } diff --git a/src/rt/typeinfo/ti_ubyte.d b/src/rt/typeinfo/ti_ubyte.d index 10e8a164c3..cd38f27a18 100644 --- a/src/rt/typeinfo/ti_ubyte.d +++ b/src/rt/typeinfo/ti_ubyte.d @@ -24,7 +24,7 @@ class TypeInfo_h : TypeInfo override string toString() const pure nothrow @safe { return "ubyte"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(ubyte *)p; } diff --git a/src/rt/typeinfo/ti_ucent.d b/src/rt/typeinfo/ti_ucent.d index a5f4a86b6d..89d3ff57af 100644 --- a/src/rt/typeinfo/ti_ucent.d +++ b/src/rt/typeinfo/ti_ucent.d @@ -28,7 +28,7 @@ class TypeInfo_zk : TypeInfo override string toString() const pure nothrow @safe { return "ucent"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return rt.util.hash.hashOf(p[0 .. ucent.sizeof], 0); } diff --git a/src/rt/typeinfo/ti_uint.d b/src/rt/typeinfo/ti_uint.d index 73e5cd4d6a..81ad1d5e3c 100644 --- a/src/rt/typeinfo/ti_uint.d +++ b/src/rt/typeinfo/ti_uint.d @@ -24,7 +24,7 @@ class TypeInfo_k : TypeInfo override string toString() const pure nothrow @safe { return "uint"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(uint *)p; } diff --git a/src/rt/typeinfo/ti_ulong.d b/src/rt/typeinfo/ti_ulong.d index ab1e4629c4..d791b05b3b 100644 --- a/src/rt/typeinfo/ti_ulong.d +++ b/src/rt/typeinfo/ti_ulong.d @@ -26,7 +26,7 @@ class TypeInfo_m : TypeInfo override string toString() const pure nothrow @safe { return "ulong"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return rt.util.hash.hashOf(p[0 .. ulong.sizeof], 0); } diff --git a/src/rt/typeinfo/ti_ushort.d b/src/rt/typeinfo/ti_ushort.d index 152b42426a..0034e91713 100644 --- a/src/rt/typeinfo/ti_ushort.d +++ b/src/rt/typeinfo/ti_ushort.d @@ -24,7 +24,7 @@ class TypeInfo_t : TypeInfo override string toString() const pure nothrow @safe { return "ushort"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(ushort *)p; } diff --git a/src/rt/typeinfo/ti_void.d b/src/rt/typeinfo/ti_void.d index 759c6bc4cb..c35de7b88d 100644 --- a/src/rt/typeinfo/ti_void.d +++ b/src/rt/typeinfo/ti_void.d @@ -24,7 +24,7 @@ class TypeInfo_v : TypeInfo override string toString() const pure nothrow @safe { return "void"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { assert(0); } diff --git a/src/rt/typeinfo/ti_wchar.d b/src/rt/typeinfo/ti_wchar.d index da27c2870a..aca21dbd84 100644 --- a/src/rt/typeinfo/ti_wchar.d +++ b/src/rt/typeinfo/ti_wchar.d @@ -24,7 +24,7 @@ class TypeInfo_u : TypeInfo override string toString() { return "wchar"; } - override size_t getHash(in void* p) + override size_t getHash(scope const void* p) { return *cast(wchar *)p; }