Skip to content

Commit bf058d6

Browse files
Use std::string
1 parent bbd50fa commit bf058d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Firestore/core/src/model/object_value.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void ApplyChanges(
115115
for (pb_size_t source_index = 0, target_index = 0;
116116
target_index < target_count;) {
117117
if (source_index < source_count) {
118-
absl::string_view key = MakeString(source_fields[source_index].key);
118+
std::string key = MakeString(source_fields[source_index].key);
119119

120120
// Check if the source key is deleted
121121
if (delete_it != deletes.end() && *delete_it == key) {
@@ -129,9 +129,9 @@ void ApplyChanges(
129129

130130
// Check if the source key is updated by the next upsert
131131
if (upsert_it != upserts.end() && upsert_it->first == key) {
132-
FreeNanopbMessage(google_firestore_v1_MapValue_FieldsEntry_fields,
133-
&source_fields[source_index]);
134-
target_fields[target_index].key = MakeBytesArray(upsert_it->first);
132+
FreeNanopbMessage(google_firestore_v1_Value_fields,
133+
&source_fields[source_index].value);
134+
target_fields[target_index].key = source_fields[source_index].key;
135135
target_fields[target_index].value = DeepClone(upsert_it->second);
136136

137137
++upsert_it;

0 commit comments

Comments
 (0)