Closed Sqeaky closed 5 years ago
Those all look reasonable, I will look into them today.
The parameters for the copy constructor and copy assignment operator should be const. Otherwise this looks good.
Oh, I see. That was dumb of me. Earlier when we were talking I thought you meant one of the functions that accept the argc and argv.
I will upload a fix momentarily.
As a side note, this functionality may be something we want to put off into another library focused on utilities for executables. But for now I'm fine with it's inclusion in the Foundation until we have more such utilities.
1) Line 63 of CommandLine.h you say "nain" instead of what I think is meant to be "main". 2) Use of "Mezzanine::String" seems needlessly verbose (as opposed to "String"). 3) I'm curious how the linking for the "ArgToken" variable will be handled. Normally I'd say slap an inline on that to be more safe/explicit but Ubuntu is giving us issues with that. 4) Line 101 of CommandLine.h, first word is "argument" and I think should say "arguments". 5) Line 124 of CommandLine.h ends with "Short arguments have one "-", long have two" and I think it would be clearer by saying "Short arguments have one ArgToken ("-"), and long arguments have two ArgTokens". 6) Line 182 of CommandLine.h has an extra curly bracket "}". 7) Rule of 5 for the CommandLine class? As a side note of this, having const members makes it not movable (if we even care). 8) Line 44 of CommandLineTests.h is missing it's "brief" text. 9) In the tests you seem to be saving the warning state, doing nothing with it, then restoring it.
That's it for my first pass. I'll give it another pass after edits and before merging.