test/options: Rename member variables (#1720)
This commit is contained in:
parent
b222953bae
commit
d49fe421e8
|
@ -19,30 +19,30 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
options::options(int argc, const char* const argv[])
|
options::options(int argc, const char* const argv[])
|
||||||
:_options(argv + 1, argv + argc)
|
:mOptions(argv + 1, argv + argc)
|
||||||
,_which_test("")
|
,mWhichTest("")
|
||||||
,_quiet(_options.count("-q") != 0)
|
,mQuiet(mOptions.count("-q") != 0)
|
||||||
,_help(_options.count("-h") != 0 || _options.count("--help"))
|
,mHelp(mOptions.count("-h") != 0 || mOptions.count("--help"))
|
||||||
{
|
{
|
||||||
_options.erase("-q");
|
mOptions.erase("-q");
|
||||||
_options.erase("-h");
|
mOptions.erase("-h");
|
||||||
_options.erase("--help");
|
mOptions.erase("--help");
|
||||||
if (! _options.empty()) {
|
if (! mOptions.empty()) {
|
||||||
_which_test = *_options.rbegin();
|
mWhichTest = *mOptions.rbegin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool options::quiet() const
|
bool options::quiet() const
|
||||||
{
|
{
|
||||||
return _quiet;
|
return mQuiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool options::help() const
|
bool options::help() const
|
||||||
{
|
{
|
||||||
return _help;
|
return mHelp;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& options::which_test() const
|
const std::string& options::which_test() const
|
||||||
{
|
{
|
||||||
return _which_test;
|
return mWhichTest;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,10 +42,10 @@ private:
|
||||||
const options& operator =(const options& non_assign);
|
const options& operator =(const options& non_assign);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::set<std::string> _options;
|
std::set<std::string> mOptions;
|
||||||
std::string _which_test;
|
std::string mWhichTest;
|
||||||
const bool _quiet;
|
const bool mQuiet;
|
||||||
const bool _help;
|
const bool mHelp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue