File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ size_t CalculateSizeOfUnion(
81
81
// minus the number of deleted entries.
82
82
return upserts.size () +
83
83
std::count_if (
84
- map_value-> fields , map_value-> fields + map_value-> fields_count ,
84
+ map_value. fields , map_value. fields + map_value. fields_count ,
85
85
[&](const google_firestore_v1_MapValue_FieldsEntry& entry) {
86
86
std::string field = MakeString (entry.key );
87
87
// Don't count if entry is deleted or if it is a replacement
@@ -114,10 +114,10 @@ void ApplyChanges(
114
114
// Merge the existing data with the deletes and updates
115
115
for (pb_size_t source_index = 0 , target_index = 0 ;
116
116
target_index < target_count;) {
117
- if (source_index < source_count) {
118
- auto & source_entry = source_fields[source_index];
119
- auto & target_entry = target_fields[target_index];
117
+ auto & source_entry = source_fields[source_index];
118
+ auto & target_entry = target_fields[target_index];
120
119
120
+ if (source_index < source_count) {
121
121
std::string source_key = MakeString (source_entry.key );
122
122
123
123
// Check if the source key is deleted
Original file line number Diff line number Diff line change 23
23
#include " Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h"
24
24
#include " Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h"
25
25
#include " Firestore/Protos/nanopb/google/type/latlng.nanopb.h"
26
+ #include " Firestore/core/src/nanopb/message.h"
26
27
27
28
namespace firebase {
28
29
namespace firestore {
@@ -132,6 +133,12 @@ inline const pb_field_t* FieldsArray<google_firestore_v1_Value>() {
132
133
return google_firestore_v1_Value_fields;
133
134
}
134
135
136
+ template <>
137
+ inline const pb_field_t *
138
+ FieldsArray<google_firestore_v1_MapValue_FieldsEntry>() {
139
+ return google_firestore_v1_MapValue_FieldsEntry_fields;
140
+ }
141
+
135
142
template <>
136
143
inline const pb_field_t * FieldsArray<google_firestore_v1_Write>() {
137
144
return google_firestore_v1_Write_fields;
You can’t perform that action at this time.
0 commit comments