Skip to content

Commit b17da1e

Browse files
committed
Clean-up, renaming
1 parent e567400 commit b17da1e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

RetailCoder.VBE/Inspections/QuickFixes/PassParameterByReferenceQuickFix.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ private ArgContext GetArgContextForIdentifier(ParserRuleContext context, string
4141
{
4242
if (procStmtCtxChildren[idx] is ArgListContext)
4343
{
44-
var procStmtCtxChild = (ArgListContext)procStmtCtxChildren[idx];
45-
var arg = procStmtCtxChild.children;
44+
var argListContext = (ArgListContext)procStmtCtxChildren[idx];
45+
var arg = argListContext.children;
4646
for (int idx2 = 0; idx2 < arg.Count; idx2++)
4747
{
4848
if (arg[idx2] is ArgContext)
@@ -99,13 +99,13 @@ private string GenerateByRefReplacementLine(TerminalNodeImpl terminalNodeImpl)
9999

100100
return ReplaceAtIndex(byValTokenLine, Tokens.ByVal, Tokens.ByRef, terminalNodeImpl.Symbol.Column);
101101
}
102-
private string ReplaceAtIndex(string input, string toReplace, string replacement, int index)
102+
private string ReplaceAtIndex(string input, string toReplace, string replacement, int startIndex)
103103
{
104-
int stopIndex = index + toReplace.Length;
105-
var prefix = input.Substring(0, index);
104+
int stopIndex = startIndex + toReplace.Length;
105+
var prefix = input.Substring(0, startIndex);
106106
var suffix = input.Substring(stopIndex + 1);
107-
var target = input.Substring(index, stopIndex - index + 1);
108-
return prefix + target.Replace(toReplace, replacement) + suffix;
107+
var tokenToBeReplaced = input.Substring(startIndex, stopIndex - startIndex + 1);
108+
return prefix + tokenToBeReplaced.Replace(toReplace, replacement) + suffix;
109109
}
110110
private void ReplaceModuleLine(int lineNumber, string replacementLine)
111111
{

0 commit comments

Comments
 (0)