From f93d656e53381256342af9dc18ea14c17e86075f Mon Sep 17 00:00:00 2001 From: mailwl Date: Fri, 29 Dec 2017 21:04:10 +0300 Subject: [PATCH] citra(SDL) small fixes: fix fall-through, remove u16 'always true' compare --- src/citra/citra.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 85d7ab0994..f1c5a64dbe 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp @@ -11,10 +11,8 @@ // This needs to be included before getopt.h because the latter #defines symbols used by it #include "common/microprofile.h" -#ifdef _MSC_VER -#include -#else #include +#ifndef _MSC_VER #include #endif @@ -157,13 +155,14 @@ int main(int argc, char** argv) { errno = EINVAL; if (errno != 0) exit(1); + break; } case 'm': { use_multiplayer = true; - std::string str_arg(optarg); + const std::string str_arg(optarg); // regex to check if the format is nickname:password@ip:port // with optional :password - std::regex re("^([^:]+)(?::(.+))?@([^:]+)(?::([0-9]+))?$"); + const std::regex re("^([^:]+)(?::(.+))?@([^:]+)(?::([0-9]+))?$"); if (!std::regex_match(str_arg, re)) { std::cout << "Wrong format for option --multiplayer\n"; PrintHelp(argv[0]); @@ -188,10 +187,6 @@ int main(int argc, char** argv) { std::cout << "Address to room must not be empty.\n"; return 0; } - if (port > 65535) { - std::cout << "Port must be between 0 and 65535.\n"; - return 0; - } break; } case 'h':