mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[cleanup] Improve hash code
This commit is contained in:
parent
3263fe1cc2
commit
a8cd87b8a5
1 changed files with 4 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2008 MontaVista Software, Inc.
|
* Copyright (c) 2008 MontaVista Software, Inc.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Yu-Fen Kuo (MontaVista) - initial API and implementation
|
* Yu-Fen Kuo (MontaVista) - initial API and implementation
|
||||||
* Anna Dushistova (MontaVista) - initial API and implementation
|
* Anna Dushistova (MontaVista) - initial API and implementation
|
||||||
|
@ -24,7 +24,7 @@ public class TerminalElement extends AbstractResource {
|
||||||
super(terminalServiceSubSystem);
|
super(terminalServiceSubSystem);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class TerminalElement extends AbstractResource {
|
||||||
|
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
if (terminalShell != null)
|
if (terminalShell != null)
|
||||||
return terminalShell.hashCode() + name.hashCode();
|
return terminalShell.hashCode() * 37 + name.hashCode();
|
||||||
return name.hashCode() ;
|
return name.hashCode() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue