Skip to content

Commit ab8b574

Browse files
Fix compile
1 parent 273171b commit ab8b574

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

firestore/src/main/field_value_main.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,12 @@ std::string Describe(Type type) {
294294

295295
// Helpers
296296

297-
SharedMessage<google_firestore_v1_Value>& GetProtoValue() {
297+
const SharedMessage<google_firestore_v1_Value>&
298+
FieldValueInternal::GetProtoValue() const {
299+
return absl::get<SharedMessage<google_firestore_v1_Value>>(value_);
300+
}
301+
302+
SharedMessage<google_firestore_v1_Value>& FieldValueInternal::GetProtoValue() {
298303
return absl::get<SharedMessage<google_firestore_v1_Value>>(value_);
299304
}
300305

firestore/src/main/field_value_main.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ class FieldValueInternal {
7474
explicit FieldValueInternal(FieldValue::Type type, T value)
7575
: type_{type}, value_{std::move(value)} {}
7676

77+
/** Returns the underlying value as a google_firestore_v1_Value proto. */
78+
const nanopb::SharedMessage<google_firestore_v1_Value>& GetProtoValue() const;
79+
7780
/** Returns the underlying value as a google_firestore_v1_Value proto. */
7881
nanopb::SharedMessage<google_firestore_v1_Value>& GetProtoValue();
7982

0 commit comments

Comments
 (0)