Fix snake_case with read_input in previous days

master
Nick Krichevsky 2020-12-06 01:28:38 -05:00
parent 3a6a074ece
commit e058128ce5
5 changed files with 10 additions and 10 deletions

View File

@ -10,7 +10,7 @@ constexpr int TARGET_NUM = 2020;
* @param filename The filename to read from
* @return std::set<int> A set of the numbers in the input
*/
std::set<int> read_input(const std::string &filename) {
std::set<int> readInput(const std::string &filename) {
std::set<int> input;
std::string line;
std::ifstream file(filename);
@ -53,7 +53,7 @@ int main(int argc, const char *argv[]) {
return 1;
}
std::set<int> inputs = read_input(argv[1]);
std::set<int> inputs = readInput(argv[1]);
std::cout << part1(inputs) << std::endl;
std::cout << part2(inputs) << std::endl;
}

View File

@ -54,7 +54,7 @@ class Policy {
char letter;
};
std::vector<std::string> read_input(const std::string &filename) {
std::vector<std::string> readInput(const std::string &filename) {
std::vector<std::string> input;
std::string line;
std::ifstream file(filename);
@ -138,7 +138,7 @@ int main(int argc, char *argv[]) {
return 1;
}
auto input = read_input(argv[1]);
auto input = readInput(argv[1]);
std::cout << part1(input) << std::endl;
std::cout << part2(input) << std::endl;
}

View File

@ -6,7 +6,7 @@
constexpr char TREE_CHAR = '#';
std::vector<std::string> read_input(const std::string &filename) {
std::vector<std::string> readInput(const std::string &filename) {
std::vector<std::string> input;
std::string line;
std::ifstream file(filename);
@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {
return 1;
}
auto input = read_input(argv[1]);
auto input = readInput(argv[1]);
std::cout << part1(input) << std::endl;
std::cout << part2(input) << std::endl;
}

View File

@ -37,7 +37,7 @@ const auto FIELD_VALIDATORS = std::map<std::string, std::function<bool(const std
{"cid", [](const std::string &value) { return true; }},
};
std::string read_input(const std::string &filename) {
std::string readInput(const std::string &filename) {
std::vector<std::string> input;
std::string line;
std::ifstream file(filename);
@ -195,7 +195,7 @@ int main(int argc, char *argv[]) {
return 1;
}
std::string input = read_input(argv[1]);
std::string input = readInput(argv[1]);
auto passports = makePassportMaps(input);
std::cout << part1(passports) << std::endl;
std::cout << part2(passports) << std::endl;

View File

@ -14,7 +14,7 @@ constexpr char BACK_CHAR = 'B';
constexpr char RIGHT_CHAR = 'R';
constexpr char LEFT_CHAR = 'L';
std::vector<std::string> read_input(const std::string &filename) {
std::vector<std::string> readInput(const std::string &filename) {
std::vector<std::string> input;
std::string line;
std::ifstream file(filename);
@ -125,7 +125,7 @@ int main(int argc, char *argv[]) {
return 1;
}
auto input = read_input(argv[1]);
auto input = readInput(argv[1]);
std::cout << part1(input) << std::endl;
std::cout << part2(input) << std::endl;
}