aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/type_resolver_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/type_resolver_util.cc')
-rw-r--r--src/google/protobuf/util/type_resolver_util.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/google/protobuf/util/type_resolver_util.cc b/src/google/protobuf/util/type_resolver_util.cc
index a69ed58c..3a3eba4b 100644
--- a/src/google/protobuf/util/type_resolver_util.cc
+++ b/src/google/protobuf/util/type_resolver_util.cc
@@ -37,6 +37,7 @@
#include <google/protobuf/util/internal/utility.h>
#include <google/protobuf/util/type_resolver.h>
#include <google/protobuf/stubs/strutil.h>
+
#include <google/protobuf/stubs/status.h>
namespace google {
@@ -60,7 +61,7 @@ class DescriptorPoolTypeResolver : public TypeResolver {
const DescriptorPool* pool)
: url_prefix_(url_prefix), pool_(pool) {}
- Status ResolveMessageType(const string& type_url, Type* type) {
+ Status ResolveMessageType(const string& type_url, Type* type) override {
string type_name;
Status status = ParseTypeUrl(type_url, &type_name);
if (!status.ok()) {
@@ -75,7 +76,7 @@ class DescriptorPoolTypeResolver : public TypeResolver {
return Status();
}
- Status ResolveEnumType(const string& type_url, Enum* enum_type) {
+ Status ResolveEnumType(const string& type_url, Enum* enum_type) override {
string type_name;
Status status = ParseTypeUrl(type_url, &type_name);
if (!status.ok()) {
@@ -179,9 +180,10 @@ class DescriptorPoolTypeResolver : public TypeResolver {
Status ParseTypeUrl(const string& type_url, string* type_name) {
if (type_url.substr(0, url_prefix_.size() + 1) != url_prefix_ + "/") {
- return Status(INVALID_ARGUMENT,
- StrCat("Invalid type URL, type URLs must be of the form '",
- url_prefix_, "/<typename>', got: ", type_url));
+ return Status(
+ INVALID_ARGUMENT,
+ StrCat("Invalid type URL, type URLs must be of the form '",
+ url_prefix_, "/<typename>', got: ", type_url));
}
*type_name = type_url.substr(url_prefix_.size() + 1);
return Status();