Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,6 @@ cc_library(
":number",
":status_macros",
":well_known_types",
"//common:memory",
"//extensions/protobuf/internal:map_reflection",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:nullability",
Expand Down
29 changes: 14 additions & 15 deletions internal/message_equality.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "absl/types/variant.h"
#include "common/memory.h"
#include "extensions/protobuf/internal/map_reflection.h"
#include "internal/json.h"
#include "internal/number.h"
Expand Down Expand Up @@ -846,7 +845,7 @@ class MessageEqualsState final {
well_known_types::UnpackAnyIfResolveable(
&arena_, lhs_reflection_.any_reflection, lhs, pool_, factory_));
if (lhs_unpacked) {
lhs_ptr = cel::to_address(lhs_unpacked);
lhs_ptr = lhs_unpacked.get();
lhs_descriptor = lhs_ptr->GetDescriptor();
lhs_well_known_type = lhs_descriptor->well_known_type();
}
Expand All @@ -857,7 +856,7 @@ class MessageEqualsState final {
well_known_types::UnpackAnyIfResolveable(
&arena_, rhs_reflection_.any_reflection, rhs, pool_, factory_));
if (rhs_unpacked) {
rhs_ptr = cel::to_address(rhs_unpacked);
rhs_ptr = rhs_unpacked.get();
rhs_descriptor = rhs_ptr->GetDescriptor();
rhs_well_known_type = rhs_descriptor->well_known_type();
}
Expand Down Expand Up @@ -1017,7 +1016,7 @@ class MessageEqualsState final {
lhs.GetReflection()->GetMessage(lhs, lhs_field),
pool_, factory_));
if (lhs_unpacked) {
lhs_ptr = cel::to_address(lhs_unpacked);
lhs_ptr = lhs_unpacked.get();
lhs_field = nullptr;
}
} else if (lhs_field == nullptr && IsAny(lhs)) {
Expand All @@ -1026,7 +1025,7 @@ class MessageEqualsState final {
well_known_types::UnpackAnyIfResolveable(
&arena_, lhs_reflection_.any_reflection, lhs, pool_, factory_));
if (lhs_unpacked) {
lhs_ptr = cel::to_address(lhs_unpacked);
lhs_ptr = lhs_unpacked.get();
}
}
if (rhs_field != nullptr && IsAnyField(rhs_field)) {
Expand All @@ -1036,7 +1035,7 @@ class MessageEqualsState final {
rhs.GetReflection()->GetMessage(rhs, rhs_field),
pool_, factory_));
if (rhs_unpacked) {
rhs_ptr = cel::to_address(rhs_unpacked);
rhs_ptr = rhs_unpacked.get();
rhs_field = nullptr;
}
} else if (rhs_field == nullptr && IsAny(rhs)) {
Expand All @@ -1045,7 +1044,7 @@ class MessageEqualsState final {
well_known_types::UnpackAnyIfResolveable(
&arena_, rhs_reflection_.any_reflection, rhs, pool_, factory_));
if (rhs_unpacked) {
rhs_ptr = cel::to_address(rhs_unpacked);
rhs_ptr = rhs_unpacked.get();
}
}
EquatableValue lhs_value;
Expand Down Expand Up @@ -1125,8 +1124,8 @@ class MessageEqualsState final {
const Message* absl_nonnull rhs_message =
rhs_field != nullptr
? &rhs.GetReflection()->GetMessage(rhs, rhs_field)
: rhs_unpacked != nullptr ? cel::to_address(rhs_unpacked)
: &rhs;
: rhs_unpacked.get() != nullptr ? rhs_unpacked.get()
: &rhs;
const auto* rhs_descriptor = rhs_message->GetDescriptor();
const auto rhs_well_known_type = rhs_descriptor->well_known_type();
switch (rhs_well_known_type) {
Expand Down Expand Up @@ -1206,8 +1205,8 @@ class MessageEqualsState final {
const Message* absl_nonnull lhs_message =
lhs_field != nullptr
? &lhs.GetReflection()->GetMessage(lhs, lhs_field)
: lhs_unpacked != nullptr ? cel::to_address(lhs_unpacked)
: &lhs;
: lhs_unpacked.get() != nullptr ? lhs_unpacked.get()
: &lhs;
const auto* lhs_descriptor = lhs_message->GetDescriptor();
const auto lhs_well_known_type = lhs_descriptor->well_known_type();
switch (lhs_well_known_type) {
Expand Down Expand Up @@ -1294,8 +1293,8 @@ class MessageEqualsState final {
const Message* absl_nonnull rhs_message =
rhs_field != nullptr
? &rhs.GetReflection()->GetMessage(rhs, rhs_field)
: rhs_unpacked != nullptr ? cel::to_address(rhs_unpacked)
: &rhs;
: rhs_unpacked.get() != nullptr ? rhs_unpacked.get()
: &rhs;
const auto* rhs_descriptor = rhs_message->GetDescriptor();
const auto rhs_well_known_type = rhs_descriptor->well_known_type();
switch (rhs_well_known_type) {
Expand Down Expand Up @@ -1374,8 +1373,8 @@ class MessageEqualsState final {
const Message* absl_nonnull lhs_message =
lhs_field != nullptr
? &lhs.GetReflection()->GetMessage(lhs, lhs_field)
: lhs_unpacked != nullptr ? cel::to_address(lhs_unpacked)
: &lhs;
: lhs_unpacked.get() != nullptr ? lhs_unpacked.get()
: &lhs;
const auto* lhs_descriptor = lhs_message->GetDescriptor();
const auto lhs_well_known_type = lhs_descriptor->well_known_type();
switch (lhs_well_known_type) {
Expand Down
Loading