forked from jasder/antlr
Fix generation of calls to List.remove(int) which should become RemoveAt
This commit is contained in:
parent
fb5c7655ea
commit
a960ca940e
|
@ -360,7 +360,7 @@ namespace Antlr4.Runtime.Atn
|
|||
if (addKey)
|
||||
{
|
||||
mergedConfigs.Put(key, unmergedConfig);
|
||||
unmerged.Remove(i);
|
||||
unmerged.RemoveAt(i);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ namespace Antlr4.Runtime.Atn
|
|||
{
|
||||
if (unmerged[i] == config)
|
||||
{
|
||||
unmerged.Remove(i);
|
||||
unmerged.RemoveAt(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ namespace Antlr4.Runtime.Atn
|
|||
|
||||
public virtual Antlr4.Runtime.Atn.Transition RemoveTransition(int index)
|
||||
{
|
||||
return transitions.Remove(index);
|
||||
return transitions.RemoveAt(index);
|
||||
}
|
||||
|
||||
public abstract Antlr4.Runtime.Atn.StateType StateType
|
||||
|
@ -290,7 +290,7 @@ namespace Antlr4.Runtime.Atn
|
|||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
optimizedTransitions.Remove(i);
|
||||
optimizedTransitions.RemoveAt(i);
|
||||
}
|
||||
|
||||
public ATNState()
|
||||
|
|
|
@ -168,13 +168,13 @@ namespace Antlr4.Runtime.Dfa
|
|||
}
|
||||
if (index == values.Count - 1)
|
||||
{
|
||||
values.Remove(index);
|
||||
values.RemoveAt(index);
|
||||
return this;
|
||||
}
|
||||
Antlr4.Runtime.Dfa.SparseEdgeMap<T> result = new Antlr4.Runtime.Dfa.SparseEdgeMap
|
||||
<T>(this, GetMaxSparseSize());
|
||||
System.Array.Copy(result.keys, index + 1, result.keys, index, Size() - index - 1);
|
||||
result.values.Remove(index);
|
||||
result.values.RemoveAt(index);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -780,7 +780,7 @@ namespace Antlr4.Runtime.Misc
|
|||
// if whole interval x..x, rm
|
||||
if (el == a && el == b)
|
||||
{
|
||||
intervals.Remove(i);
|
||||
intervals.RemoveAt(i);
|
||||
break;
|
||||
}
|
||||
// if on left edge x..b, adjust left
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace Antlr4.Runtime.Misc
|
|||
|
||||
public virtual bool Remove(int i)
|
||||
{
|
||||
T o = elements.Remove(i);
|
||||
T o = elements.RemoveAt(i);
|
||||
return base.Remove(o);
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ namespace Antlr4.Runtime
|
|||
{
|
||||
if (children != null)
|
||||
{
|
||||
children.Remove(children.Count - 1);
|
||||
children.RemoveAt(children.Count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
-typeMapping java.util.Comparator System.Collections.IComparer
|
||||
-typeMapping java.util.ArrayList System.Collections.ArrayList
|
||||
|
||||
-methodMapping java.util.List.addAll AddRange
|
||||
-methodMapping java.util.List.addAll AddRange
|
||||
-methodMapping java.util.List.remove(int) RemoveAt
|
||||
-methodMapping java.util.AbstractList.addAll AddRange
|
||||
-methodMapping java.util.ArrayList.addAll AddRange
|
||||
|
||||
|
@ -43,9 +44,6 @@
|
|||
-namespaceMapping javax.net.ssl Sharpen
|
||||
-methodMapping java.lang.Object.memberwiseClone Clone
|
||||
-methodMapping java.nio.charset.Charset.forName Sharpen.Extensions.GetEncoding
|
||||
-methodMapping java.util.List<>.remove RemoveAt
|
||||
-methodMapping java.util.IList<>.remove RemoveAt
|
||||
-methodMapping java.util.ArrayList.remove RemoveAt
|
||||
-methodMapping java.util.ArrayList.trimToSize TrimExcess
|
||||
-methodMapping java.lang.Integer.toOctalString Sharpen.Extensions.ToOctalString
|
||||
-methodMapping java.lang.Integer.toHexString Sharpen.Extensions.ToHexString
|
||||
|
|
Loading…
Reference in New Issue