diff options
author | rsgowman <rgowman@google.com> | 2018-06-04 15:31:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 15:31:10 -0400 |
commit | 26b8ac9ee43bb67b08e4bc62af98ac6bda2f121c (patch) | |
tree | bf6b194b8a4a6247247a22b701a65e2be1eaf723 /Firestore/core/src/firebase/firestore/nanopb/reader.h | |
parent | a135ee17175f8f186e73252263b8dbc3785f3d3c (diff) |
Skip unknown fields while decoding FieldValue proto objects. (#1354)
Diffstat (limited to 'Firestore/core/src/firebase/firestore/nanopb/reader.h')
-rw-r--r-- | Firestore/core/src/firebase/firestore/nanopb/reader.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Firestore/core/src/firebase/firestore/nanopb/reader.h b/Firestore/core/src/firebase/firestore/nanopb/reader.h index 930211a..2c16ec4 100644 --- a/Firestore/core/src/firebase/firestore/nanopb/reader.h +++ b/Firestore/core/src/firebase/firestore/nanopb/reader.h @@ -89,6 +89,15 @@ class Reader { template <typename T> T ReadNestedMessage(const std::function<T(Reader*)>& read_message_fn); + /** + * Discards the bytes associated with the given tag. + * + * @param tag The tag associated with the field that is otherwise about to be + * read. This method uses the tag to determine how many bytes should be + * discarded. + */ + void SkipField(const Tag& tag); + size_t bytes_left() const { return stream_.bytes_left; } |