aboutsummaryrefslogtreecommitdiff
path: root/icing/index/numeric/posting-list-integer-index-serializer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'icing/index/numeric/posting-list-integer-index-serializer.cc')
-rw-r--r--icing/index/numeric/posting-list-integer-index-serializer.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/icing/index/numeric/posting-list-integer-index-serializer.cc b/icing/index/numeric/posting-list-integer-index-serializer.cc
index 6556451..99f14f9 100644
--- a/icing/index/numeric/posting-list-integer-index-serializer.cc
+++ b/icing/index/numeric/posting-list-integer-index-serializer.cc
@@ -222,7 +222,8 @@ libtextclassifier3::Status PostingListIntegerIndexSerializer::PrependData(
}
}
-uint32_t PostingListIntegerIndexSerializer::PrependDataArray(
+libtextclassifier3::StatusOr<uint32_t>
+PostingListIntegerIndexSerializer::PrependDataArray(
PostingListUsed* posting_list_used, const IntegerIndexData* array,
uint32_t num_data, bool keep_prepended) const {
if (!IsPostingListValid(posting_list_used)) {
@@ -240,7 +241,7 @@ uint32_t PostingListIntegerIndexSerializer::PrependDataArray(
// before. PopFrontData guarantees that it will remove all 'i' data so long
// as there are at least 'i' data in the posting list, which we know there
// are.
- PopFrontData(posting_list_used, /*num_data=*/i);
+ ICING_RETURN_IF_ERROR(PopFrontData(posting_list_used, /*num_data=*/i));
return 0;
}
return i;
@@ -335,7 +336,7 @@ libtextclassifier3::Status PostingListIntegerIndexSerializer::PopFrontData(
// - out[1] is a valid data less than all previous data in the posting list.
// - There's no way that the posting list could run out of room because it
// previously stored these 2 data.
- PrependData(posting_list_used, out[1]);
+ ICING_RETURN_IF_ERROR(PrependData(posting_list_used, out[1]));
} else if (num_data > 0) {
return GetDataInternal(posting_list_used, /*limit=*/num_data, /*pop=*/true,
/*out=*/nullptr);