diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-02-26 07:21:51 -0500 | 
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-02-26 07:21:51 -0500 | 
| commit | 4a7848148e886676dd24bfcf4f50db06bffb28da (patch) | |
| tree | d9b9afcae85cfc8bba8c62c3ab0c743f38bf8da1 | |
| parent | bf7c215692435ceb85d8991a9337933688dc0cf0 (diff) | |
Add TODOs for getTokens() to known places that scan command lines.
Lacking time to properly test new LLStringUtil::getTokens() against the
present (different!) command-line scanners in LLExternalEditor::tokenize() and
LLCommandLineParser::parseCommandLineString(), just annotate as future work
the goal of unifying them... SIGH.
| -rw-r--r-- | indra/newview/llcommandlineparser.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llexternaleditor.cpp | 6 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 65c61c4a8b..17d403bbe1 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -342,6 +342,15 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv)      return parseAndStoreResults(clp);  } +// TODO: +// - Break out this funky parsing logic into separate method +// - Unit-test it with tests like LLStringUtil::getTokens() (the command-line +//   overload that supports quoted tokens) +// - Unless this logic offers significant semantic benefits, replace it with +//   LLStringUtil::getTokens(). This would fix a known bug: you cannot --set a +//   string-valued variable to the empty string, because empty strings are +//   eliminated below. +  bool LLCommandLineParser::parseCommandLineString(const std::string& str)  {      // Split the string content into tokens diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index db482f023e..9480e54809 100644 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -119,6 +119,12 @@ std::string LLExternalEditor::getErrorMessage(EErrorCode code)  	return LLTrans::getString("Unknown");  } +// TODO: +// - Unit-test this with tests like LLStringUtil::getTokens() (the +//   command-line overload that supports quoted tokens) +// - Unless there are significant semantic differences, eliminate this method +//   and use LLStringUtil::getTokens() instead. +  // static  size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str)  { | 
