Skip to content

Commit

Permalink
chore(ConfigParser.cpp): Moved parseJSON up in file
Browse files Browse the repository at this point in the history
  • Loading branch information
Taanviir committed Jan 25, 2024
1 parent b21154c commit c215d07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions parser/ConfigParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ ConfigParser::ConfigParser() {}

ConfigParser::~ConfigParser() {}

void ConfigParser::parseJSON(const std::string file) {
std::string json;
readFile(file, json);
std::cout << json;
}

void ConfigParser::readFile(const std::string& filepath, std::string& output) {
std::cout << "Reading config file: " << filepath << std::endl;

Expand All @@ -21,9 +27,3 @@ void ConfigParser::readFile(const std::string& filepath, std::string& output) {
}
inputFileStream.close();
}

void ConfigParser::parseJSON(const std::string file) {
std::string json;
readFile(file, json);
std::cout << json;
}

0 comments on commit c215d07

Please sign in to comment.