ENH: CompactListList: avoiding unnecessary check

This commit is contained in:
mattijs 2013-07-31 17:17:51 +01:00
parent e9ca6c66e6
commit 00bfe2bc84

View File

@ -223,11 +223,7 @@ inline Foam::UList<T> Foam::CompactListList<T, Container>::operator[]
)
{
label start = offsets_[i];
return UList<T>
(
(m_.size() ? m_.begin() + start : NULL),
offsets_[i+1] - start
);
return UList<T>(m_.begin() + start, offsets_[i+1] - start);
}
@ -241,7 +237,7 @@ Foam::CompactListList<T, Container>::operator[]
label start = offsets_[i];
return UList<T>
(
(m_.size() ? const_cast<T*>(m_.begin() + start) : NULL),
const_cast<T*>(m_.begin() + start),
offsets_[i+1] - start
);
}