Skip to content

Commit d49fe42

Browse files
rikardfalkeborndanmar
authored andcommitted
test/options: Rename member variables (cppcheck-opensource#1720)
1 parent b222953 commit d49fe42

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

test/options.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,30 @@
1919
#include <iterator>
2020

2121
options::options(int argc, const char* const argv[])
22-
:_options(argv + 1, argv + argc)
23-
,_which_test("")
24-
,_quiet(_options.count("-q") != 0)
25-
,_help(_options.count("-h") != 0 || _options.count("--help"))
22+
:mOptions(argv + 1, argv + argc)
23+
,mWhichTest("")
24+
,mQuiet(mOptions.count("-q") != 0)
25+
,mHelp(mOptions.count("-h") != 0 || mOptions.count("--help"))
2626
{
27-
_options.erase("-q");
28-
_options.erase("-h");
29-
_options.erase("--help");
30-
if (! _options.empty()) {
31-
_which_test = *_options.rbegin();
27+
mOptions.erase("-q");
28+
mOptions.erase("-h");
29+
mOptions.erase("--help");
30+
if (! mOptions.empty()) {
31+
mWhichTest = *mOptions.rbegin();
3232
}
3333
}
3434

3535
bool options::quiet() const
3636
{
37-
return _quiet;
37+
return mQuiet;
3838
}
3939

4040
bool options::help() const
4141
{
42-
return _help;
42+
return mHelp;
4343
}
4444

4545
const std::string& options::which_test() const
4646
{
47-
return _which_test;
47+
return mWhichTest;
4848
}

test/options.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ class options {
4242
const options& operator =(const options& non_assign);
4343

4444
private:
45-
std::set<std::string> _options;
46-
std::string _which_test;
47-
const bool _quiet;
48-
const bool _help;
45+
std::set<std::string> mOptions;
46+
std::string mWhichTest;
47+
const bool mQuiet;
48+
const bool mHelp;
4949
};
5050

5151
#endif

0 commit comments

Comments
 (0)