1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Minor optimization in TypeInstantiationRequest.equals method.

Change-Id: Ie9efe4000b9354e9c2193a0f8264e771ffe8e169
This commit is contained in:
Sergey Prigogin 2016-07-28 10:03:03 -07:00 committed by Gerrit Code Review @ Eclipse.org
parent 4289aa7b0d
commit c4f4122343

View file

@ -59,7 +59,9 @@ public class TypeInstantiationRequest {
@Override
public boolean equals(Object obj) {
if (!obj.getClass().equals(getClass()))
if (this == obj)
return true;
if (!getClass().equals(obj.getClass()))
return false;
TypeInstantiationRequest other = (TypeInstantiationRequest) obj;
if (!type.isSameType(other.type))