Please don't make this sort of change. With the code as originally written, I can set a breakpoint on the returns "true" or "false" case separately, and stop there if I am doing that experiment, whereas your change makes that impossible. Neither one is particularly harder to read than the other, but your version is significantly harder to debug.
Jim > On Feb 19, 2016, at 11:33 AM, Eugene Zelenko via lldb-commits > <lldb-commits@lists.llvm.org> wrote: > > regex_chars (const char comp) > { > - if (comp == '[' || comp == ']' || > - comp == '(' || comp == ')' || > - comp == '{' || comp == '}' || > - comp == '+' || > - comp == '.' || > - comp == '*' || > - comp == '|' || > - comp == '^' || > - comp == '$' || > - comp == '\\' || > - comp == '?') > - return true; > - else > - return false; > -} > -CommandCompletions::SymbolCompleter::SymbolCompleter > -( > - CommandInterpreter &interpreter, > - const char *completion_str, > - int match_start_point, > - int max_return_elements, > - StringList &matches > -) : > + return (comp == '[' || comp == ']' || > + comp == '(' || comp == ')' || > + comp == '{' || comp == '}' || > + comp == '+' || > + comp == '.' || > + comp == '*' || > + comp == '|' || > + comp == '^' || > + comp == '$' || > + comp == '\\' || > + comp == '?'); > +} > + _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits