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