Skip to content
Snippets Groups Projects
  1. Nov 10, 2015
  2. Aug 05, 2013
    • Nat Goodspeed's avatar
      CHOP-951, IQA-1477: Validate args for numeric command-line switches. · 7f6e7fc0
      Nat Goodspeed authored
      The logic in llcommandlineparser.cpp's setControlValueCB() callback function
      for converting command-line switch argument values from string to the actual
      type of the map-to settings variable had a couple special cases for boolean
      and LLSD array. But for S32, U32 and F32, it simply used default LLSD
      string-to-numeric conversion. LLSD's string-to-numeric conversion is a bit
      lame: for non-numeric strings, it shrugs and returns 0.
      Introduce onevalue() and badvalue() helper functions that, like certain errors
      during command-line parsing, throw LLCLPError. Use them to streamline certain
      redundancies in setControlValueCB(). Introduce convertTo<T>() helper function
      that uses boost::lexical_cast() for slightly more stringent conversions. Add
      cases for U32, S32 and F32 targets.
      setControlValueCB() is actually called only by LLControlGroupCLP::notify(),
      not during actual command-line parsing.
      Make LLControlGroupCLP::notify() return bool. Make it catch LLCLPError, set
      the error for getErrorMessage() and return false on that exception.
      Package LLAppViewer::initConfiguration()'s response to initParseCommandLine()
      returning false as a new handleCommandLineError() function; invoke it both
      there and when LLControlGroupCLP::notify() returns false.
      7f6e7fc0
  3. Mar 29, 2013
  4. Oct 13, 2010
  5. Sep 21, 2010
  6. Aug 13, 2010
  7. Jan 07, 2009
  8. Jun 25, 2008
  9. Apr 16, 2008
  10. Mar 20, 2008
  11. Mar 14, 2008
Loading