Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 32ffc72

Browse files
authored
No need for dstrcmp in object.d (#3165)
No need for dstrcmp in object.d merged-on-behalf-of: Mathias LANG <pro.mathias.lang@gmail.com>
1 parent b8fb84c commit 32ffc72

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/object.d

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,14 @@ class TypeInfo
326326
return hashOf(this.toString());
327327
}
328328

329-
override int opCmp(Object o)
329+
override int opCmp(Object rhs)
330330
{
331-
import core.internal.string : dstrcmp;
332-
333-
if (this is o)
331+
if (this is rhs)
334332
return 0;
335-
TypeInfo ti = cast(TypeInfo)o;
333+
auto ti = cast(TypeInfo) rhs;
336334
if (ti is null)
337335
return 1;
338-
return dstrcmp(this.toString(), ti.toString());
336+
return __cmp(this.toString(), ti.toString());
339337
}
340338

341339
override bool opEquals(Object o)
@@ -3010,7 +3008,6 @@ private size_t getArrayHash(const scope TypeInfo element, const scope void* ptr,
30103008
|| cast(const TypeInfo_Interface) element;
30113009
}
30123010

3013-
import core.internal.traits : externDFunc;
30143011
if (!hasCustomToHash(element))
30153012
return hashOf(ptr[0 .. elementSize * count]);
30163013

0 commit comments

Comments
 (0)