View Single Post
Old 07-25-2016, 05:53 PM   #54
varlog
actually it is /var/log
varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.
 
varlog's Avatar
 
Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
In The Source: The Lambda, Cet obscur objet du désir

[/REALITY].

now it's
Code:
    auto skip_whiteys=[]()->void
        {while(text.at(pos).isSpace() && pos<len) ++pos;};
and will be:
Code:
   auto skip_whiteys=[]
        {while(text.at(pos).isSpace() && pos<len) ++pos;};
if all the compilers agree on it.
I have not checked yet if it works (should, theoretically, global, in context, variables should be available) , because I'm in the middle of rewrite and I even don't try to compile... so don't think it's final...

But, eventually, I'll time lambda versus WHITESPACE.contains(). Let the better man win.
I'm using named lambdas to make code more readable.

Quote:
Originally Posted by KevinH View Post
...(not 100% sure of this but it is close)...
Precisely that brought me to isSpace. I decided to trust the Qt guys: they did some real work about what the white space in QString is.

EDIT: no, those lambdas are no go...

I forgot..
tbc...?

Last edited by varlog; 07-25-2016 at 06:18 PM.
varlog is offline   Reply With Quote