Commit 53e183b3 authored by Dominik Charousset's avatar Dominik Charousset

Remove debug output

parent 1db95908
...@@ -29,30 +29,24 @@ namespace detail { ...@@ -29,30 +29,24 @@ namespace detail {
void parse_ini_t::operator()(std::istream& input, config_consumer consumer_fun, void parse_ini_t::operator()(std::istream& input, config_consumer consumer_fun,
optional<std::ostream&> errors) const { optional<std::ostream&> errors) const {
printf("%s %d\n", __FILE__, __LINE__);
// wraps a temporary into an (lvalue) config_value and calls `consumer_fun` // wraps a temporary into an (lvalue) config_value and calls `consumer_fun`
auto consumer = [&](size_t ln, std::string name, config_value x) { auto consumer = [&](size_t ln, std::string name, config_value x) {
consumer_fun(ln, std::move(name), x); consumer_fun(ln, std::move(name), x);
}; };
printf("%s %d\n", __FILE__, __LINE__);
std::string group; std::string group;
std::string line; std::string line;
size_t ln = 0; // line number size_t ln = 0; // line number
printf("%s %d\n", __FILE__, __LINE__);
auto print = [&](const char* category, const char* str) { auto print = [&](const char* category, const char* str) {
if (errors) if (errors)
*errors << category << " INI file line " *errors << category << " INI file line "
<< ln << ": " << str << std::endl; << ln << ": " << str << std::endl;
}; };
printf("%s %d\n", __FILE__, __LINE__);
auto print_error = [&](const char* str) { auto print_error = [&](const char* str) {
print("[ERROR]", str); print("[ERROR]", str);
}; };
printf("%s %d\n", __FILE__, __LINE__);
auto print_warning = [&](const char* str) { auto print_warning = [&](const char* str) {
print("[WARNING]", str); print("[WARNING]", str);
}; };
printf("%s %d\n", __FILE__, __LINE__);
while (std::getline(input, line)) { while (std::getline(input, line)) {
++ln; ++ln;
// get begin-of-line (bol) and end-of-line (eol), ignoring whitespaces // get begin-of-line (bol) and end-of-line (eol), ignoring whitespaces
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment