diff options
author | Cassie Wang <cassiewang@google.com> | 2020-01-16 10:12:38 -0800 |
---|---|---|
committer | Cassie Wang <cassiewang@google.com> | 2020-01-16 12:26:33 -0800 |
commit | 533fe97b018af47301d7dc1ca3fb2e3ad5ee3eb8 (patch) | |
tree | 86f3ed098a3eccd8019f0b31c3ea10e4779cf4bd /icing/file/file-backed-bitmap.cc | |
parent | 88a9b37a20d4a601baf3b6ca0cfb1ad826dc7e29 (diff) | |
download | icing-533fe97b018af47301d7dc1ca3fb2e3ad5ee3eb8.tar.gz |
Pull upstream changes.
Upstream synced @290094995
Bug: 146383629
Test: manual, ran 'm -j libicing' with a local Android.bp
Change-Id: I63eb12e93f3de5d6607ba7006fd3ea532dc079e4
Diffstat (limited to 'icing/file/file-backed-bitmap.cc')
-rw-r--r-- | icing/file/file-backed-bitmap.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/icing/file/file-backed-bitmap.cc b/icing/file/file-backed-bitmap.cc index 64e6a65..f1e568c 100644 --- a/icing/file/file-backed-bitmap.cc +++ b/icing/file/file-backed-bitmap.cc @@ -19,7 +19,6 @@ #include "icing/text_classifier/lib3/utils/base/status.h" #include "icing/text_classifier/lib3/utils/base/statusor.h" #include "icing/absl_ports/canonical_errors.h" -#include "icing/absl_ports/status_macros.h" #include "icing/absl_ports/str_cat.h" #include "icing/file/filesystem.h" #include "icing/file/memory-mapped-file.h" @@ -27,6 +26,7 @@ #include "icing/util/crc32.h" #include "icing/util/logging.h" #include "icing/util/math-util.h" +#include "icing/util/status-macros.h" namespace icing { namespace lib { @@ -216,7 +216,7 @@ libtextclassifier3::Status FileBackedBitmap::Set(int bit_index, const int word_index = bit_index / kNumWordBits; const int word_mask = 1u << (bit_index % kNumWordBits); - TC3_ASSIGN_OR_RETURN(Word old_word, GetWord(word_index)); + ICING_ASSIGN_OR_RETURN(Word old_word, GetWord(word_index)); Word new_word = bit_value ? (old_word | word_mask) : old_word & ~word_mask; if (new_word != old_word) { ICING_RETURN_IF_ERROR(SetWord(word_index, new_word)); @@ -236,7 +236,7 @@ libtextclassifier3::StatusOr<bool> FileBackedBitmap::Get(int bit_index) const { const Word word_index = bit_index / kNumWordBits; const Word word_mask = 1u << (bit_index % kNumWordBits); - TC3_ASSIGN_OR_RETURN(Word word, GetWord(word_index)); + ICING_ASSIGN_OR_RETURN(Word word, GetWord(word_index)); return word & word_mask; } @@ -298,7 +298,7 @@ libtextclassifier3::Status FileBackedBitmap::TruncateTo(int new_num_bits) { // Mask to only keep bits <= new_num_bits and clear everything else. const Word word_mask = (1u << (new_num_bits % kNumWordBits)) - 1; - TC3_ASSIGN_OR_RETURN(Word old_word, GetWord(word_index)); + ICING_ASSIGN_OR_RETURN(Word old_word, GetWord(word_index)); Word new_word = old_word & word_mask; ICING_RETURN_IF_ERROR(SetWord(word_index, new_word)); |