Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ae8e510e authored by David Parsons's avatar David Parsons
Browse files

switch to "auto fn() -> return_type" syntax

parent 531dc99b
No related branches found
No related tags found
No related merge requests found
...@@ -48,8 +48,8 @@ using namespace aevol; ...@@ -48,8 +48,8 @@ using namespace aevol;
// Helper functions // Helper functions
void print_help(char* prog_path); void print_help(char* prog_path);
std::tuple<std::string, std::string> interpret_cmd_line_options(int argc, char* argv[]); auto interpret_cmd_line_options(int argc, char* argv[]) -> std::tuple<std::string, std::string>;
std::list<std::string> read_sequence_file(const std::string& chromosome_file_name); auto read_sequence_file(const std::string& chromosome_file_name) -> std::list<std::string>;
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
const auto [param_file_name, chromosome_file_name] = interpret_cmd_line_options(argc, argv); const auto [param_file_name, chromosome_file_name] = interpret_cmd_line_options(argc, argv);
...@@ -121,7 +121,7 @@ void print_help(char* prog_path) { ...@@ -121,7 +121,7 @@ void print_help(char* prog_path) {
printf("\tload chromosome from given text file instead of generating it\n"); printf("\tload chromosome from given text file instead of generating it\n");
} }
std::tuple<std::string, std::string> interpret_cmd_line_options(int argc, char* argv[]) { auto interpret_cmd_line_options(int argc, char* argv[]) -> std::tuple<std::string, std::string> {
// Command-line option variables // Command-line option variables
std::string param_file_name; std::string param_file_name;
std::string chromosome_file_name; std::string chromosome_file_name;
...@@ -184,7 +184,7 @@ auto read_sequence(std::ifstream& chromosome_file, const std::string& chromosome ...@@ -184,7 +184,7 @@ auto read_sequence(std::ifstream& chromosome_file, const std::string& chromosome
return chromosome; return chromosome;
} }
std::list<std::string> read_sequence_file(const std::string& chromosome_file_name) { auto read_sequence_file(const std::string& chromosome_file_name) -> std::list<std::string> {
assert(chromosome_file_name.length() != 0); assert(chromosome_file_name.length() != 0);
std::list<std::string> chromosomes; std::list<std::string> chromosomes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment