diff --git a/main.cpp b/main.cpp index 66ef06c..5ca087d 100644 --- a/main.cpp +++ b/main.cpp @@ -80,15 +80,8 @@ int main(int argc, char *argv[]) App::srv->set_mount_point("/static", "/var/www/static"); - auto host = App::DefaultHost; - auto port = App::DefaultPort; - - if (argc > 1) { - host = argv[1]; - } - if (argc > 2) { - port = atoi(argv[2]); - } + auto host = argc > 1 ? argv[1] : App::DefaultHost; + auto port = argc > 2 ? atoi(argv[2]) : App::DefaultPort; std::cout << "Listen on " << host << ":" << port << std::endl;