Skip to content

Commit 0ba402f

Browse files
committed
Refs #638: Avoid shadowing arguments
1 parent f437d61 commit 0ba402f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

simplecpp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,10 @@ static bool isStringLiteralPrefix(const std::string &str)
635635
str == "R" || str == "uR" || str == "UR" || str == "LR" || str == "u8R";
636636
}
637637

638-
void simplecpp::TokenList::lineDirective(unsigned int fileIndex, unsigned int line, Location &location)
638+
void simplecpp::TokenList::lineDirective(unsigned int fileId, unsigned int line, Location &location)
639639
{
640-
if (fileIndex != location.fileIndex || line >= location.line) {
641-
location.fileIndex = fileIndex;
640+
if (fileId != location.fileIndex || line >= location.line) {
641+
location.fileIndex = fileId;
642642
location.line = line;
643643
return;
644644
}

simplecpp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ namespace simplecpp {
174174
bool isOneOf(const char ops[]) const;
175175
bool startsWithOneOf(const char c[]) const;
176176
bool endsWithOneOf(const char c[]) const;
177-
static bool isNumberLike(const std::string& str) {
178-
return std::isdigit(static_cast<unsigned char>(str[0])) ||
179-
(str.size() > 1U && (str[0] == '-' || str[0] == '+') && std::isdigit(static_cast<unsigned char>(str[1])));
177+
static bool isNumberLike(const std::string& s) {
178+
return std::isdigit(static_cast<unsigned char>(s[0])) ||
179+
(s.size() > 1U && (s[0] == '-' || s[0] == '+') && std::isdigit(static_cast<unsigned char>(s[1])));
180180
}
181181

182182
TokenString macro;
@@ -396,7 +396,7 @@ namespace simplecpp {
396396
void constFoldQuestionOp(Token *&tok1);
397397

398398
std::string readUntil(Stream &stream, const Location &location, char start, char end, OutputList *outputList);
399-
void lineDirective(unsigned int fileIndex, unsigned int line, Location &location);
399+
void lineDirective(unsigned int fileId, unsigned int line, Location &location);
400400

401401
const Token* lastLineTok(int maxsize=1000) const;
402402
const Token* isLastLinePreprocessor(int maxsize=1000) const;

0 commit comments

Comments
 (0)