mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-11 04:35:05 +01:00
Merge pull request #3335 from mailwl/citra-sdl-small-fix
citra(SDL) small fixes: fix fall-through
This commit is contained in:
commit
337e9e12eb
@ -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 <getopt.h>
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#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':
|
||||
|
Loading…
Reference in New Issue
Block a user