1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Unquote command-line arguments when adding them to ArgumentList

This commit is contained in:
ed 2020-11-26 17:59:57 +00:00
parent ba172bc828
commit 142a52f9b8

View file

@ -141,7 +141,7 @@ ArgumentList::ArgumentList (String exeName, StringArray args)
args.removeEmptyStrings();
for (auto& a : args)
arguments.add ({ a });
arguments.add ({ a.unquoted() });
}
ArgumentList::ArgumentList (int argc, char* argv[])
@ -168,7 +168,7 @@ int ArgumentList::indexOfOption (StringRef option) const
jassert (option == String (option).trim()); // passing non-trimmed strings will always fail to find a match!
for (int i = 0; i < arguments.size(); ++i)
if (arguments.getReference(i) == option)
if (arguments.getReference (i) == option)
return i;
return -1;