aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/field_comparator.cc
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@google.com>2017-12-01 10:05:10 -0800
committerAdam Cozzette <acozzette@google.com>2017-12-01 10:05:10 -0800
commit92a7e778e7394386f413cec28d67a07630f784b1 (patch)
treecb5673c7c09b0d3905b48a24765d07e423bc5b30 /src/google/protobuf/util/field_comparator.cc
parentce0a53273a400369932ba788d17500336a6ecaad (diff)
downloadprotobuf-92a7e778e7394386f413cec28d67a07630f784b1.tar.gz
protobuf-92a7e778e7394386f413cec28d67a07630f784b1.tar.bz2
protobuf-92a7e778e7394386f413cec28d67a07630f784b1.zip
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/util/field_comparator.cc')
-rw-r--r--src/google/protobuf/util/field_comparator.cc10
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);