{
vector<Option>::const_iterator it = find(options, optopt);
if (it == options.end())
- SN_THROW(Exception("option not found"));
+ SN_THROW(OptionsException("option not found"));
opt = string("--") + it->name;
}
{
vector<Option>::const_iterator it = c ? find(options, c) : options.begin() + option_index;
if (it == options.end())
- SN_THROW(Exception("option not found"));
+ SN_THROW(OptionsException("option not found"));
result[it->name] = optarg ? optarg : "";
break;
vector<struct option>
- GetOpts::make_longopts(const vector<Option> options) const
+ GetOpts::make_longopts(const vector<Option>& options) const
{
vector<struct option> ret;
char** argv;
string make_optstring(const vector<Option>& options) const;
- vector<struct option> make_longopts(const vector<Option> options) const;
+ vector<struct option> make_longopts(const vector<Option>& options) const;
vector<Option>::const_iterator find(const vector<Option>& options, char c) const;
std::ostream&
operator<<(std::ostream& s, const vector<string>& v)
{
- for(std::vector<string>::const_iterator it = v.begin(); it != v.end(); ++it)
+ for (std::vector<string>::const_iterator it = v.begin(); it != v.end(); ++it)
{
if (it != v.begin())
s << " ";