0
3
0
... | ... |
@@ -25,14 +25,13 @@ |
25 | 25 |
(static_cast<ArgParser*>(p))->showHelp(); |
26 | 26 |
exit(1); |
27 | 27 |
} |
28 | 28 |
|
29 |
ArgParser::ArgParser(int argc, const char **argv) :_argc(argc), _argv(argv), |
|
30 |
_command_name(argv[0]) { |
|
29 |
ArgParser::ArgParser(int argc, const char * const *argv) |
|
30 |
:_argc(argc), _argv(argv), _command_name(argv[0]) { |
|
31 | 31 |
funcOption("-help","Print a short help message",_showHelp,this); |
32 | 32 |
synonym("help","-help"); |
33 | 33 |
synonym("h","-help"); |
34 |
|
|
35 | 34 |
} |
36 | 35 |
|
37 | 36 |
ArgParser::~ArgParser() |
38 | 37 |
{ |
... | ... |
@@ -45,9 +45,9 @@ |
45 | 45 |
static void _showHelp(void *p); |
46 | 46 |
protected: |
47 | 47 |
|
48 | 48 |
int _argc; |
49 |
const char **_argv; |
|
49 |
const char * const *_argv; |
|
50 | 50 |
|
51 | 51 |
enum OptType { UNKNOWN=0, BOOL=1, STRING=2, DOUBLE=3, INTEGER=4, FUNC=5 }; |
52 | 52 |
|
53 | 53 |
class ParData { |
... | ... |
@@ -118,9 +118,9 @@ |
118 | 118 |
|
119 | 119 |
public: |
120 | 120 |
|
121 | 121 |
///Constructor |
122 |
ArgParser(int argc, const char **argv); |
|
122 |
ArgParser(int argc, const char * const *argv); |
|
123 | 123 |
|
124 | 124 |
~ArgParser(); |
125 | 125 |
|
126 | 126 |
///\name Options |
0 comments (0 inline)