From 9dbb05d26cad6137fb2a20d313add4afff5c94f8 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sat, 4 Jun 2022 21:52:38 +0200 Subject: [PATCH] Removed const from argv; removed comment header --- sciotest/main.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sciotest/main.cpp b/sciotest/main.cpp index 75f811a..83df733 100644 --- a/sciotest/main.cpp +++ b/sciotest/main.cpp @@ -1,11 +1,3 @@ -// -// main.cpp -// sciotest -// -// Created by Bob Polis at 2020-02-14 -// Copyright (c) 2020 SwiftCoder. All rights reserved. -// - #include #include #include @@ -99,7 +91,7 @@ void test5() { } } -int main(int argc, const char * argv[]) { +int main(int argc, char * argv[]) { try { struct option long_options[] = { {"help", no_argument, nullptr, 'h'}, @@ -109,7 +101,7 @@ int main(int argc, const char * argv[]) { }; int opt_char, option_index; int test_id = 0; - while ((opt_char = getopt_long(argc, const_cast(argv), "ht:v", long_options, &option_index)) != -1) { + while ((opt_char = getopt_long(argc, argv, "ht:v", long_options, &option_index)) != -1) { switch (opt_char) { case 0: { // handle long-only options here