aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/type_info.cc
diff options
context:
space:
mode:
authorGravatar Khuzema Pithewan <khuzemap@gmail.com>2018-05-21 15:16:34 -0700
committerGravatar Khuzema Pithewan <khuzemap@gmail.com>2018-06-19 11:03:01 -0700
commit6f88e12f9dee4a658913b475e7680952c6ff3cac (patch)
treefb9690e6928deb21cb6df6558d4405a61aede251 /src/google/protobuf/util/internal/type_info.cc
parent2213c1c1f6bae29513729b7285462b24df20d687 (diff)
Add "override" for overridden virtual functions
Add "override" for overridden virtual functions. Please refer following issue for discussion on this. https://github.com/google/protobuf/issues/67
Diffstat (limited to 'src/google/protobuf/util/internal/type_info.cc')
-rw-r--r--src/google/protobuf/util/internal/type_info.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/google/protobuf/util/internal/type_info.cc b/src/google/protobuf/util/internal/type_info.cc
index 3847b179..e32e71d0 100644
--- a/src/google/protobuf/util/internal/type_info.cc
+++ b/src/google/protobuf/util/internal/type_info.cc
@@ -59,7 +59,7 @@ class TypeInfoForTypeResolver : public TypeInfo {
}
virtual util::StatusOr<const google::protobuf::Type*> ResolveTypeUrl(
- StringPiece type_url) const {
+ StringPiece type_url) const override {
std::map<StringPiece, StatusOrType>::iterator it =
cached_types_.find(type_url);
if (it != cached_types_.end()) {
@@ -79,13 +79,13 @@ class TypeInfoForTypeResolver : public TypeInfo {
}
virtual const google::protobuf::Type* GetTypeByTypeUrl(
- StringPiece type_url) const {
+ StringPiece type_url) const override {
StatusOrType result = ResolveTypeUrl(type_url);
return result.ok() ? result.ValueOrDie() : NULL;
}
virtual const google::protobuf::Enum* GetEnumByTypeUrl(
- StringPiece type_url) const {
+ StringPiece type_url) const override {
std::map<StringPiece, StatusOrEnum>::iterator it =
cached_enums_.find(type_url);
if (it != cached_enums_.end()) {
@@ -105,8 +105,10 @@ class TypeInfoForTypeResolver : public TypeInfo {
return result.ok() ? result.ValueOrDie() : NULL;
}
+
virtual const google::protobuf::Field* FindField(
- const google::protobuf::Type* type, StringPiece camel_case_name) const {
+ const google::protobuf::Type* type,
+ StringPiece camel_case_name) const override {
std::map<const google::protobuf::Type*, CamelCaseNameTable>::const_iterator
it = indexed_types_.find(type);
const CamelCaseNameTable& camel_case_name_table =