Fix compile with MSVC
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
#include "version.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <getopt.h>
|
||||
#ifndef _MSC_VER
|
||||
# include <getopt.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -119,6 +121,7 @@ void CommandlineOptions::RemoveArg(const QString &starts_with, int count) {
|
||||
|
||||
bool CommandlineOptions::Parse() {
|
||||
|
||||
#ifndef _MSC_VER // TODO: Consider QCommandLineOption.
|
||||
static const struct option kOptions[] = {
|
||||
{"help", no_argument, nullptr, 'h'},
|
||||
{"play", no_argument, nullptr, 'p'},
|
||||
@@ -319,6 +322,8 @@ bool CommandlineOptions::Parse() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user