Removed const from main signature
This commit is contained in:
parent
f8ea704231
commit
7eb6dcb5ef
@ -29,7 +29,7 @@ void print_version() {
|
|||||||
std::cout << "curly version 1.0\n";
|
std::cout << "curly version 1.0\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, const char * argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
try {
|
try {
|
||||||
int opt_char, opt_val;
|
int opt_char, opt_val;
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
@ -37,7 +37,7 @@ int main(int argc, const char * argv[]) {
|
|||||||
{"version", no_argument, &opt_val, 1},
|
{"version", no_argument, &opt_val, 1},
|
||||||
{nullptr, 0, nullptr, 0}
|
{nullptr, 0, nullptr, 0}
|
||||||
};
|
};
|
||||||
while ((opt_char = getopt_long(argc, const_cast<char* const *>(argv), "h", long_options, nullptr)) != -1) {
|
while ((opt_char = getopt_long(argc, argv, "h", long_options, nullptr)) != -1) {
|
||||||
std::string arg {optarg ? optarg : ""};
|
std::string arg {optarg ? optarg : ""};
|
||||||
switch (opt_char) {
|
switch (opt_char) {
|
||||||
case 0: {
|
case 0: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user