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 | static const QString STATE_NAV_FOCUSED = "NavigationFocused"; | 401 | static const QString STATE_NAV_FOCUSED = "NavigationFocused"; |
| 402 | 402 | ||
| 403 | bool setupEssentials(int& argc, char** argv) { | 403 | bool setupEssentials(int& argc, char** argv) { |
| 404 | unsigned int listenPort = 0; // bind to an ephemeral port by default | ||
| 405 | const char** constArgv = const_cast<const char**>(argv); | 404 | const char** constArgv = const_cast<const char**>(argv); |
| 406 | const char* portStr = getCmdOption(argc, constArgv, "--listenPort"); | 405 | const char* portStr = getCmdOption(argc, constArgv, "--listenPort"); |
| 407 | if (portStr) { | 406 | const int listenPort = portStr ? atoi(portStr) : INVALID_PORT; |
| 408 | listenPort = atoi(portStr); | 407 | |
| 409 | } | ||
| 410 | // Set build version | 408 | // Set build version |
| 411 | QCoreApplication::setApplicationVersion(BuildInfo::VERSION); | 409 | QCoreApplication::setApplicationVersion(BuildInfo::VERSION); |
| 412 | 410 | ||