diff options
author | Adam Cozzette <acozzette@google.com> | 2017-12-01 10:05:10 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-12-01 10:05:10 -0800 |
commit | 92a7e778e7394386f413cec28d67a07630f784b1 (patch) | |
tree | cb5673c7c09b0d3905b48a24765d07e423bc5b30 /src/google/protobuf/util/field_comparator.cc | |
parent | ce0a53273a400369932ba788d17500336a6ecaad (diff) |
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/util/field_comparator.cc')
-rw-r--r-- | src/google/protobuf/util/field_comparator.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/util/field_comparator.cc b/src/google/protobuf/util/field_comparator.cc index a1a56ee6..86ddf06a 100644 --- a/src/google/protobuf/util/field_comparator.cc +++ b/src/google/protobuf/util/field_comparator.cc @@ -36,6 +36,7 @@ #include <google/protobuf/descriptor.h> #include <google/protobuf/message.h> +#include <google/protobuf/util/message_differencer.h> #include <google/protobuf/stubs/map_util.h> #include <google/protobuf/stubs/mathlimits.h> #include <google/protobuf/stubs/mathutil.h> @@ -130,6 +131,15 @@ FieldComparator::ComparisonResult DefaultFieldComparator::Compare( } } +bool DefaultFieldComparator::Compare( + MessageDifferencer* differencer, + const Message& message1, + const Message& message2, + const google::protobuf::util::FieldContext* field_context) { + return differencer->Compare( + message1, message2, field_context->parent_fields()); +} + void DefaultFieldComparator::SetDefaultFractionAndMargin(double fraction, double margin) { default_tolerance_ = Tolerance(fraction, margin); |