# HG changeset patch # User David Demelier # Date 1533552000 -7200 # Node ID 1b4f82c952d6f30a5f16ca1c5c543e0a9160e510 # Parent 580b030c875f13df0588dacee7118dec1d47a4a7 Irccd: style (main.cpp) diff -r 580b030c875f -r 1b4f82c952d6 irccd/main.cpp --- a/irccd/main.cpp Mon Aug 06 12:31:00 2018 +0200 +++ b/irccd/main.cpp Mon Aug 06 12:40:00 2018 +0200 @@ -105,9 +105,8 @@ // {{{ parse -option::result parse(int& argc, char**& argv) +auto parse(int& argc, char**& argv) -> option::result { - // Parse command line options. option::result result; try { @@ -145,14 +144,14 @@ // {{{ open -config open(const option::result& result) +auto open(const option::result& result) -> config { auto it = result.find("-c"); if (it != result.end() || (it = result.find("--config")) != result.end()) return config(it->second); - auto cfg = config::search("irccd.conf"); + const auto cfg = config::search("irccd.conf"); if (!cfg) throw std::runtime_error("no configuration file could be found"); @@ -177,7 +176,7 @@ init(argc, argv); - auto options = parse(argc, argv); + const auto options = parse(argc, argv); instance->transports().get_commands().push_back(std::make_unique()); instance->transports().get_commands().push_back(std::make_unique());