mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: CompactListList: avoiding unnecessary check
This commit is contained in:
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user