Skip to content
Snippets Groups Projects
Commit bb2d8efd authored by Oliver Sander's avatar Oliver Sander
Browse files

Minor code simplification

parent 651b8e02
No related branches found
No related tags found
No related merge requests found
......@@ -632,19 +632,13 @@ namespace Dune {
//! random access returning iterator (end if not contained)
Iterator find (size_type i)
{
if (i>=0 && i<nblocks)
return Iterator(block,i);
else
return Iterator(block,nblocks);
return Iterator(block,std::min(i,nblocks));
}
//! random access returning iterator (end if not contained)
ConstIterator find (size_type i) const
{
if (i>=0 && i<nblocks)
return ConstIterator(block,i);
else
return ConstIterator(block,nblocks);
return ConstIterator(block,std::min(i,nblocks));
}
//! ConstIterator class for sequential access
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment