Skip to content

Commit 2c73631

Browse files
Use valid values
1 parent 90918ca commit 2c73631

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

firestore/src/main/field_value_main.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ using Type = FieldValue::Type;
2929

3030
// Constructors
3131

32+
FieldValueInternal::FieldValueInternal() {
33+
auto& value = absl::get<SharedMessage<google_firestore_v1_Value>>(value_);
34+
value->which_value_type = google_firestore_v1_Value_map_value_tag;
35+
value->map_value = {};
36+
}
37+
3238
FieldValueInternal::FieldValueInternal(bool value) : type_{Type::kBoolean} {
3339
auto& proto = GetProtoValue();
3440
proto->which_value_type = google_firestore_v1_Value_boolean_value_tag;

firestore/src/main/field_value_main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace firestore {
2727

2828
class FieldValueInternal {
2929
public:
30-
FieldValueInternal() = default;
30+
FieldValueInternal();
3131

3232
explicit FieldValueInternal(bool value);
3333
explicit FieldValueInternal(int64_t value);

0 commit comments

Comments
 (0)