Skip to content

Commit

Permalink
changes from master
Browse files Browse the repository at this point in the history
  • Loading branch information
jell0nek committed Jul 1, 2013
2 parents 16444e7 + 84617bb commit 5a1c6f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
17 changes: 8 additions & 9 deletions boolinq/boolinq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 5a1c6f9

Please sign in to comment.