Removed const from main signature

This commit is contained in:
Bob Polis 2021-09-17 17:12:02 +02:00
parent f8ea704231
commit 7eb6dcb5ef

View File

@ -29,7 +29,7 @@ void print_version() {
std::cout << "curly version 1.0\n";
}
int main(int argc, const char * argv[]) {
int main(int argc, char* argv[]) {
try {
int opt_char, opt_val;
struct option long_options[] = {
@ -37,7 +37,7 @@ int main(int argc, const char * argv[]) {
{"version", no_argument, &opt_val, 1},
{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 : ""};
switch (opt_char) {
case 0: {