mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Use 'equals' to compare variables instead of names.
This commit is contained in:
parent
ddbb11efa5
commit
2e0af82c97
2 changed files with 6 additions and 14 deletions
|
@ -1,3 +1,7 @@
|
|||
2003-01-27 Mikhail Khodjaiants
|
||||
Use 'equals' to compare CDI variables instead of names.
|
||||
* CStackFrame.java
|
||||
|
||||
2003-01-27 Alain Magloire
|
||||
|
||||
* src/org/eclipse/cdt/debug/core/cdi/model/ICDIVariableObject.java:
|
||||
|
|
|
@ -130,11 +130,6 @@ public class CStackFrame extends CDebugElement
|
|||
ICDIVariable var = findVariable( locals, local.getCDIVariable() );
|
||||
if ( var != null )
|
||||
{
|
||||
// update variable with new underling CDI LocalVariable
|
||||
if ( !var.equals( local.getCDIVariable() ) )
|
||||
{
|
||||
local.setCDIVariable( var );
|
||||
}
|
||||
locals.remove( var );
|
||||
index++;
|
||||
}
|
||||
|
@ -718,21 +713,14 @@ public class CStackFrame extends CDebugElement
|
|||
}
|
||||
}
|
||||
|
||||
// temporary solution
|
||||
protected ICDIVariable findVariable( List list, ICDIVariable var )
|
||||
{
|
||||
Iterator it = list.iterator();
|
||||
while( it.hasNext() )
|
||||
{
|
||||
ICDIVariable newVar = (ICDIVariable)it.next();
|
||||
try
|
||||
{
|
||||
if ( newVar.getName().equals( var.getName() ) )
|
||||
return newVar;
|
||||
}
|
||||
catch( CDIException e )
|
||||
{
|
||||
}
|
||||
if ( newVar.equals( var ) )
|
||||
return newVar;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue