michaelh added inline comments.

INLINE COMMENTS

> bruns wrote in advancedqueryparser.cpp:69
> > I don't understand. token is QString. Why not instead of switch 
> > (token.at(0).toLatin1())
> > 
> >   switch (token) {
> >   case '>'`: comparator = Term::Greater; break;
> >   case '>='`: comparator = Term::GreaterEqual; break;
> > 
> > 
> > What am I missing?
> 
> You can only `switch` on integral statements (ints, chars, ...). With C++11, 
> you can do some `constexpr` hacks, but your code won't work as is.

> You can only switch on integral statements (ints, chars, ...).

Heh? That's surprising![1] Anyway, thanks for the lesson a keep this code as it 
is now.

[1]
Coming from javascript `switch` definitely is a "false friend". 
Can I become a beef steak?

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D11888

To: bruns, #baloo, michaelh
Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin

Reply via email to