ENH: CompactListList: avoiding unnecessary check
This commit is contained in:
parent
e9ca6c66e6
commit
00bfe2bc84
@ -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
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user