diff options
author | Gil <mcg@google.com> | 2018-07-13 14:50:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 14:50:57 -0700 |
commit | 84641b0b58ac3d925ea931b60faf4ba5ad7157c5 (patch) | |
tree | 207cf9a44227dadf4d6b5c14161c9827e8577a8d | |
parent | 920cfbfa998ca9d04cce5f7731aced7e950a3477 (diff) |
Suppress uninitialized read error under VS2017 (#1523)
* Suppress uninitialized read error under VS2017.
* Default-initialize Tag instead of requiring users to remember to do so.
* Add constructors to match usage
-rw-r--r-- | Firestore/core/src/firebase/firestore/nanopb/tag.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/nanopb/tag.h b/Firestore/core/src/firebase/firestore/nanopb/tag.h index 455ef0c..f9ad828 100644 --- a/Firestore/core/src/firebase/firestore/nanopb/tag.h +++ b/Firestore/core/src/firebase/firestore/nanopb/tag.h @@ -32,8 +32,14 @@ namespace nanopb { * google_firestore_v1beta1_Document_name_tag. */ struct Tag { - pb_wire_type_t wire_type; - uint32_t field_number; + Tag() { + } + + Tag(pb_wire_type_t w, uint32_t f) : wire_type{w}, field_number{f} { + } + + pb_wire_type_t wire_type = PB_WT_VARINT; + uint32_t field_number = 0u; }; } // namespace nanopb |