diff options
author | Cassie Wang <cassiewang@google.com> | 2020-01-08 15:57:57 -0800 |
---|---|---|
committer | Cassie Wang <cassiewang@google.com> | 2020-01-09 01:53:36 +0000 |
commit | 88a9b37a20d4a601baf3b6ca0cfb1ad826dc7e29 (patch) | |
tree | 079657ba93902169139425fd1bb08a93c80de9c2 /icing/file/file-backed-bitmap.cc | |
parent | 128c9db88925c8425f2ad81e1d8985461d7ba21a (diff) | |
download | icing-88a9b37a20d4a601baf3b6ca0cfb1ad826dc7e29.tar.gz |
Pull upstream changes and copy libtextclassifier classes.
Upstream synced @288789500.
Copied text_classifier dependencies (hash, status, logging) into icing/.
Bug: 146383629
Test: manual - ran 'm -j libicing' with a working Android.bp locally
Change-Id: I187a98af95b362745a09d605ed8334a6ff6971bb
Diffstat (limited to 'icing/file/file-backed-bitmap.cc')
-rw-r--r-- | icing/file/file-backed-bitmap.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/icing/file/file-backed-bitmap.cc b/icing/file/file-backed-bitmap.cc index 0eb9474..64e6a65 100644 --- a/icing/file/file-backed-bitmap.cc +++ b/icing/file/file-backed-bitmap.cc @@ -16,8 +16,8 @@ #include <cstdint> -#include "utils/base/status.h" -#include "utils/base/statusor.h" +#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" @@ -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); - ICING_ASSIGN_OR_RETURN(Word old_word, GetWord(word_index)); + TC3_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); - ICING_ASSIGN_OR_RETURN(Word word, GetWord(word_index)); + TC3_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; - ICING_ASSIGN_OR_RETURN(Word old_word, GetWord(word_index)); + TC3_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)); |