options: whitespace
This commit is contained in:
parent
9db4dd5b08
commit
1d65a7ed77
@ -531,7 +531,8 @@ processor::parse_args (int argc, const char ** argv)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
processor::add_option (std::unique_ptr<option> opt) {
|
processor::add_option (std::unique_ptr<option> opt)
|
||||||
|
{
|
||||||
if (m_shortopt.find (opt->shortopt ()) != m_shortopt.end ())
|
if (m_shortopt.find (opt->shortopt ()) != m_shortopt.end ())
|
||||||
throw std::logic_error ("Short option already exists");
|
throw std::logic_error ("Short option already exists");
|
||||||
if (m_longopt.find (opt->longopt ()) != m_longopt.end ())
|
if (m_longopt.find (opt->longopt ()) != m_longopt.end ())
|
||||||
@ -546,7 +547,8 @@ processor::add_option (std::unique_ptr<option> opt) {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
std::unique_ptr<option>
|
std::unique_ptr<option>
|
||||||
processor::remove_option (char letter) {
|
processor::remove_option (char letter)
|
||||||
|
{
|
||||||
// Locate the option by short name
|
// Locate the option by short name
|
||||||
const auto s_candidate = m_shortopt.find (letter);
|
const auto s_candidate = m_shortopt.find (letter);
|
||||||
if (s_candidate == m_shortopt.end ())
|
if (s_candidate == m_shortopt.end ())
|
||||||
@ -575,7 +577,8 @@ processor::remove_option (char letter) {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
std::unique_ptr<option>
|
std::unique_ptr<option>
|
||||||
processor::remove_option (const char *name) {
|
processor::remove_option (const char *name)
|
||||||
|
{
|
||||||
// Locate the option by long name
|
// Locate the option by long name
|
||||||
const auto l_candidate = m_longopt.find (name);
|
const auto l_candidate = m_longopt.find (name);
|
||||||
if (l_candidate == m_longopt.end ())
|
if (l_candidate == m_longopt.end ())
|
||||||
|
@ -178,7 +178,6 @@ namespace util {
|
|||||||
return *val = defaultval;
|
return *val = defaultval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user