result refresh && assign iter offset
This commit is contained in:
8
deps/oblib/src/lib/geo/ob_geo_bin_iter.ipp
vendored
8
deps/oblib/src/lib/geo/ob_geo_bin_iter.ipp
vendored
@ -89,11 +89,15 @@ typename ObWkbConstIterator<T, O>::self ObWkbConstIterator<T, O>::operator--(int
|
|||||||
template<typename T, typename O>
|
template<typename T, typename O>
|
||||||
const typename ObWkbConstIterator<T, O>::self& ObWkbConstIterator<T, O>::operator=(const self& iter)
|
const typename ObWkbConstIterator<T, O>::self& ObWkbConstIterator<T, O>::operator=(const self& iter)
|
||||||
{
|
{
|
||||||
|
int ret = OB_SUCCESS;
|
||||||
idx_ = iter.idx_;
|
idx_ = iter.idx_;
|
||||||
owner_ = iter.owner_;
|
owner_ = iter.owner_;
|
||||||
diff_info_ = iter.diff_info_;
|
diff_info_ = iter.diff_info_;
|
||||||
// TODO: do vector copy?
|
// if fail to allocate memory, return the original iterator.
|
||||||
offsets_ = iter.offsets_;
|
// offsets_ is used for cache iter, won't affect correctness.
|
||||||
|
if (OB_FAIL(offsets_.assign(iter.offsets_))) {
|
||||||
|
COMMON_LOG(WARN, "fail to allocate memory", K(ret), K(iter.offsets_.count()));
|
||||||
|
}
|
||||||
return iter;
|
return iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user