generated from Trianta/cpp-unity-template
Minor code cleanup before continuing
This commit is contained in:
parent
918909c1fa
commit
9ae148e5ee
@ -3,22 +3,19 @@
|
||||
|
||||
void Generator::SetArguments(int argc, char* argv[]) {
|
||||
std::string tempStr;
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
for (int i = 1; i < argc; i += 2) {
|
||||
tempStr.assign(argv[i]);
|
||||
if (tempStr == "-i") {
|
||||
setup.isFileSet = true;
|
||||
++i;
|
||||
setup.filename.assign(argv[i]);
|
||||
setup.filename.assign(argv[i+1]);
|
||||
}
|
||||
if (tempStr == "-k") {
|
||||
setup.isPrefixSet = true;
|
||||
++i;
|
||||
setup.prefixLength = std::stoi(argv[i]);
|
||||
setup.prefixLength = std::stoi(argv[i+1]);
|
||||
}
|
||||
if (tempStr == "-n") {
|
||||
setup.isOutputSet = true;
|
||||
++i;
|
||||
setup.outputLength = std::stoi(argv[i]);
|
||||
setup.outputLength = std::stoi(argv[i+1]);
|
||||
}
|
||||
if (tempStr == "-h") {
|
||||
PrintUsage();
|
||||
|
Loading…
Reference in New Issue
Block a user