clipp icon indicating copy to clipboard operation
clipp copied to clipboard

parse(): support both `const char **argv` and `char **argv` interface version

Open GerHobbelt opened this issue 3 years ago • 1 comments

parse(): support both const char **argv and char **argv interface version.

Some codebase have argv as const char **argv or const char *argv[] while others have it without the const modifier. This takes care of that and makes clipp a drop-in for both styles.

(cherrypicked off https://github.com/GerHobbelt/clipp master branch; original commit tested with latest MSVC2019)

GerHobbelt avatar Jun 17 '21 18:06 GerHobbelt

Maybe changing char* argv[] to const char* const* argv is enough. Non-const arguments would be auto converted to const type.

chirsz-ever avatar Aug 29 '21 05:08 chirsz-ever