cleaned things up
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
// should i be sending & references?
|
||||
// const?
|
||||
std::string ConfigParser::_pre_set_val_check(const std::string key, \
|
||||
std::string ConfigParser::_pre_set_val_check(const std::string key,
|
||||
const std::string value)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ std::string ConfigParser::_pre_set_val_check(const std::string key, \
|
||||
|
||||
// std::cout << "pre check\n";
|
||||
if (key.find_first_of(";") != NPOS)
|
||||
throw std::invalid_argument("bad config file arguments 2");
|
||||
throw std::invalid_argument("bad config file arguments");
|
||||
|
||||
if (value.find_first_of("\t") != NPOS)
|
||||
throw std::invalid_argument("why would you put tabs between values");
|
||||
@@ -26,7 +26,7 @@ std::string ConfigParser::_pre_set_val_check(const std::string key, \
|
||||
// in theory value_find_last_of should find the only ;
|
||||
if (i == NPOS || (value.find_last_not_of(" \n")) != i \
|
||||
|| value.compare(";") == 0)
|
||||
throw std::invalid_argument("bad config file arguments 4");
|
||||
throw std::invalid_argument("bad config file arguments");
|
||||
|
||||
|
||||
return (value.substr(0, i));
|
||||
@@ -63,7 +63,7 @@ std::string ConfigParser::_get_rest_of_line(size_t *curr)
|
||||
}
|
||||
|
||||
|
||||
void ConfigParser::_print_content() const
|
||||
void ConfigParser::print_content() const
|
||||
{
|
||||
std::cout << _content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user