Commit 5a1c6f99 authored by Jakub Pawlik's avatar Jakub Pawlik

changes from master

parents 16444e74 84617bbb
......@@ -5,7 +5,7 @@ C++ header-only Ranges and LINQ template library
Just imagine LINQ support for STL/Qt collections :)
Get source code here: **boolinq.h**
Get source code here: **[boolinq.h](https://github.com/k06a/boolinq/blob/master/boolinq/boolinq.h)**
###How it looks like?
......
......@@ -193,16 +193,15 @@ namespace boolinq
LinqObj<Enumerator<T,std::pair<TE,int> > > skipWhile_i(std::function<bool(T,int)> predicate) const
{
return Enumerator<T,std::pair<TE,int> >([=](std::pair<TE,int> & pair)->T{
if( 0 == pair.second )
{
T t;
do
t = pair.first.nextObject();
while (predicate(t,pair.second++));
return t;
}
if (pair.second != 0)
return pair.first.nextObject();
return pair.first.nextObject();
T object;
do
object = pair.first.nextObject();
while (predicate(object,pair.second++));
return object;
}, std::make_pair(_enumerator,0));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment