src: Add constexpr to long_options

This commit is contained in:
Tatsuhiro Tsujikawa 2017-01-09 19:28:00 +09:00
parent 3444b42d44
commit 9db1c9467c
5 changed files with 5 additions and 5 deletions

View File

@ -373,7 +373,7 @@ OPTIONS:
<< std::endl; << std::endl;
} }
static struct option long_options[] = { constexpr static struct option long_options[] = {
{"http1text", no_argument, nullptr, 't'}, {"http1text", no_argument, nullptr, 't'},
{"table-size", required_argument, nullptr, 's'}, {"table-size", required_argument, nullptr, 's'},
{"deflate-table-size", required_argument, nullptr, 'S'}, {"deflate-table-size", required_argument, nullptr, 'S'},

View File

@ -1839,7 +1839,7 @@ int main(int argc, char **argv) {
bool nreqs_set_manually = false; bool nreqs_set_manually = false;
while (1) { while (1) {
static int flag = 0; static int flag = 0;
static option long_options[] = { constexpr static option long_options[] = {
{"requests", required_argument, nullptr, 'n'}, {"requests", required_argument, nullptr, 'n'},
{"clients", required_argument, nullptr, 'c'}, {"clients", required_argument, nullptr, 'c'},
{"data", required_argument, nullptr, 'd'}, {"data", required_argument, nullptr, 'd'},

View File

@ -251,7 +251,7 @@ OPTIONS:
; ;
} }
static struct option long_options[] = { constexpr static struct option long_options[] = {
{"dump-header-table", no_argument, nullptr, 'd'}, {nullptr, 0, nullptr, 0}}; {"dump-header-table", no_argument, nullptr, 'd'}, {nullptr, 0, nullptr, 0}};
int main(int argc, char **argv) { int main(int argc, char **argv) {

View File

@ -2680,7 +2680,7 @@ int main(int argc, char **argv) {
bool color = false; bool color = false;
while (1) { while (1) {
static int flag = 0; static int flag = 0;
static option long_options[] = { constexpr static option long_options[] = {
{"verbose", no_argument, nullptr, 'v'}, {"verbose", no_argument, nullptr, 'v'},
{"null-out", no_argument, nullptr, 'n'}, {"null-out", no_argument, nullptr, 'n'},
{"remote-name", no_argument, nullptr, 'O'}, {"remote-name", no_argument, nullptr, 'O'},

View File

@ -202,7 +202,7 @@ int main(int argc, char **argv) {
while (1) { while (1) {
static int flag = 0; static int flag = 0;
static option long_options[] = { constexpr static option long_options[] = {
{"address", required_argument, nullptr, 'a'}, {"address", required_argument, nullptr, 'a'},
{"daemon", no_argument, nullptr, 'D'}, {"daemon", no_argument, nullptr, 'D'},
{"htdocs", required_argument, nullptr, 'd'}, {"htdocs", required_argument, nullptr, 'd'},