aboutsummaryrefslogtreecommitdiff
path: root/icing/util/character-iterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'icing/util/character-iterator.h')
-rw-r--r--icing/util/character-iterator.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/icing/util/character-iterator.h b/icing/util/character-iterator.h
index 893718a..9df7bee 100644
--- a/icing/util/character-iterator.h
+++ b/icing/util/character-iterator.h
@@ -29,15 +29,10 @@ class CharacterIterator {
CharacterIterator(std::string_view text, int utf8_index, int utf16_index,
int utf32_index)
: text_(text),
- cached_current_char_(i18n_utils::kInvalidUChar32),
utf8_index_(utf8_index),
utf16_index_(utf16_index),
utf32_index_(utf32_index) {}
- // Returns the character that the iterator currently points to.
- // i18n_utils::kInvalidUChar32 if unable to read that character.
- UChar32 GetCurrentChar();
-
// Moves current position to desired_utf8_index.
// REQUIRES: 0 <= desired_utf8_index <= text_.length()
bool MoveToUtf8(int desired_utf8_index);
@@ -87,8 +82,6 @@ class CharacterIterator {
int utf32_index() const { return utf32_index_; }
bool operator==(const CharacterIterator& rhs) const {
- // cached_current_char_ is just that: a cached value. As such, it's not
- // considered for equality.
return text_ == rhs.text_ && utf8_index_ == rhs.utf8_index_ &&
utf16_index_ == rhs.utf16_index_ && utf32_index_ == rhs.utf32_index_;
}
@@ -99,12 +92,7 @@ class CharacterIterator {
}
private:
- // Resets the character iterator to the start of the text if any of the
- // indices are negative.
- void ResetToStartIfNecessary();
-
std::string_view text_;
- UChar32 cached_current_char_;
int utf8_index_;
int utf16_index_;
int utf32_index_;