summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-06 15:20:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-01-06 15:20:57 (GMT)
commit91f0f4aa73a78b00af9cdeb6fb7a5a4236fbad80 (patch)
treecfe228ccfd101f4171b44a5b922dd5157f26f596 /Tests
parentc1a7de72e1815cecf825d833161bc938afff65ee (diff)
parent209daa20b2bd2ee2a76e70af58e895647f7e284f (diff)
downloadCMake-91f0f4aa73a78b00af9cdeb6fb7a5a4236fbad80.zip
CMake-91f0f4aa73a78b00af9cdeb6fb7a5a4236fbad80.tar.gz
CMake-91f0f4aa73a78b00af9cdeb6fb7a5a4236fbad80.tar.bz2
Merge topic 'explicit-this-fix'
209daa20b2 Code style: add missed explicit 'this->' Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5400
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx50
-rw-r--r--Tests/CMakeLib/testCMExtMemory.cxx4
2 files changed, 27 insertions, 27 deletions
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx
index 2c77acc..0fd6cfb 100644
--- a/Tests/CMakeLib/run_compile_commands.cxx
+++ b/Tests/CMakeLib/run_compile_commands.cxx
@@ -36,8 +36,8 @@ public:
void Parse()
{
- NextNonWhitespace();
- ParseTranslationUnits();
+ this->NextNonWhitespace();
+ this->ParseTranslationUnits();
}
const TranslationUnitsType& GetTranslationUnits()
@@ -49,51 +49,51 @@ private:
void ParseTranslationUnits()
{
this->TranslationUnits = TranslationUnitsType();
- ExpectOrDie('[', "at start of compile command file\n");
+ this->ExpectOrDie('[', "at start of compile command file\n");
do {
- ParseTranslationUnit();
+ this->ParseTranslationUnit();
this->TranslationUnits.push_back(this->Command);
- } while (Expect(','));
- ExpectOrDie(']', "at end of array");
+ } while (this->Expect(','));
+ this->ExpectOrDie(']', "at end of array");
}
void ParseTranslationUnit()
{
this->Command = CommandType();
- if (!Expect('{')) {
+ if (!this->Expect('{')) {
return;
}
- if (Expect('}')) {
+ if (this->Expect('}')) {
return;
}
do {
- ParseString();
+ this->ParseString();
std::string name = this->String;
- ExpectOrDie(':', "between name and value");
- ParseString();
+ this->ExpectOrDie(':', "between name and value");
+ this->ParseString();
std::string value = this->String;
this->Command[name] = value;
- } while (Expect(','));
- ExpectOrDie('}', "at end of object");
+ } while (this->Expect(','));
+ this->ExpectOrDie('}', "at end of object");
}
void ParseString()
{
this->String = "";
- if (!Expect('"')) {
+ if (!this->Expect('"')) {
return;
}
- while (!Expect('"')) {
- Expect('\\');
- this->String.append(1, C);
- Next();
+ while (!this->Expect('"')) {
+ this->Expect('\\');
+ this->String.append(1, this->C);
+ this->Next();
}
}
bool Expect(char c)
{
if (this->C == c) {
- NextNonWhitespace();
+ this->NextNonWhitespace();
return true;
}
return false;
@@ -101,23 +101,23 @@ private:
void ExpectOrDie(char c, const std::string& message)
{
- if (!Expect(c)) {
- ErrorExit(std::string("'") + c + "' expected " + message + ".");
+ if (!this->Expect(c)) {
+ this->ErrorExit(std::string("'") + c + "' expected " + message + ".");
}
}
void NextNonWhitespace()
{
do {
- Next();
- } while (IsWhitespace());
+ this->Next();
+ } while (this->IsWhitespace());
}
void Next()
{
- this->C = char(Input.get());
+ this->C = char(this->Input.get());
if (this->Input.bad()) {
- ErrorExit("Unexpected end of file.");
+ this->ErrorExit("Unexpected end of file.");
}
}
diff --git a/Tests/CMakeLib/testCMExtMemory.cxx b/Tests/CMakeLib/testCMExtMemory.cxx
index 2aeaf7f..d8932ce 100644
--- a/Tests/CMakeLib/testCMExtMemory.cxx
+++ b/Tests/CMakeLib/testCMExtMemory.cxx
@@ -26,9 +26,9 @@ public:
: value(v)
{
}
- ~Wrapper() { delete value; }
+ ~Wrapper() { delete this->value; }
- T* get() const { return value; }
+ T* get() const { return this->value; }
private:
T* value;