Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all
Unified · Split
| @@ -401,12 +401,10 @@ static const QString STATE_GROUNDED = "Grounded"; · 400 unmodified lines | ||
| 401 | 401 | static const QString STATE_NAV_FOCUSED = "NavigationFocused"; |
| 402 | 402 | |
| 403 | 403 | bool setupEssentials(int& argc, char** argv) { |
| 404 | − unsigned int listenPort = 0; // bind to an ephemeral port by default | |
| 405 | 404 | const char** constArgv = const_cast<const char**>(argv); |
| 406 | 405 | const char* portStr = getCmdOption(argc, constArgv, "--listenPort"); |
| 407 | − if (portStr) { | |
| 408 | − listenPort = atoi(portStr); | |
| 409 | − } | |
| 406 | + const int listenPort = portStr ? atoi(portStr) : INVALID_PORT; | |
| 407 | + | |
| 410 | 408 | // Set build version |
| 411 | 409 | QCoreApplication::setApplicationVersion(BuildInfo::VERSION); |
| 412 | 410 | |