mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-12-03 17:41:33 +00:00
Merge remote-tracking branch 'origin/GP-3224_RenameFlexibility'
(Closes #4863)
This commit is contained in:
commit
ca9a56b5f4
@ -76,9 +76,7 @@ public class IsolateVariableTask extends RenameTask {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
LocalSymbolMap localSymbolMap = highFunction.getLocalSymbolMap();
|
||||
if (localSymbolMap.containsVariableWithName(newName) ||
|
||||
isSymbolInFunction(function, newName)) {
|
||||
if (isSymbolInFunction(function, newName)) {
|
||||
errorMsg = "Duplicate name";
|
||||
return false;
|
||||
}
|
||||
|
@ -60,9 +60,7 @@ public class RenameVariableTask extends RenameTask {
|
||||
@Override
|
||||
public boolean isValid(String newNm) {
|
||||
newName = newNm;
|
||||
LocalSymbolMap localSymbolMap = hfunction.getLocalSymbolMap();
|
||||
if (localSymbolMap.containsVariableWithName(newName) ||
|
||||
isSymbolInFunction(function, newName)) {
|
||||
if (isSymbolInFunction(function, newName)) {
|
||||
errorMsg = "Duplicate name";
|
||||
return false;
|
||||
}
|
||||
|
@ -425,16 +425,6 @@ public class LocalSymbolMap {
|
||||
return (HighParam) paramSymbols[i].getHighVariable();
|
||||
}
|
||||
|
||||
public boolean containsVariableWithName(String name) {
|
||||
Collection<HighSymbol> values = symbolMap.values();
|
||||
for (HighSymbol sym : values) {
|
||||
if (sym.getName().equals(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected HighSymbol newMappedSymbol(long id, String nm, DataType dt, VariableStorage store,
|
||||
Address pcaddr, int slot) {
|
||||
if (id == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user