diff options
author | Khuzema Pithewan <khuzemap@gmail.com> | 2018-05-21 15:16:34 -0700 |
---|---|---|
committer | Khuzema Pithewan <khuzemap@gmail.com> | 2018-06-19 11:03:01 -0700 |
commit | 6f88e12f9dee4a658913b475e7680952c6ff3cac (patch) | |
tree | fb9690e6928deb21cb6df6558d4405a61aede251 /src/google/protobuf/util/internal/proto_writer.h | |
parent | 2213c1c1f6bae29513729b7285462b24df20d687 (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/proto_writer.h')
-rw-r--r-- | src/google/protobuf/util/internal/proto_writer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/google/protobuf/util/internal/proto_writer.h b/src/google/protobuf/util/internal/proto_writer.h index 28496963..5bdafcc9 100644 --- a/src/google/protobuf/util/internal/proto_writer.h +++ b/src/google/protobuf/util/internal/proto_writer.h @@ -78,7 +78,7 @@ class LIBPROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { // Constructor. Does not take ownership of any parameter passed in. ProtoWriter(TypeResolver* type_resolver, const google::protobuf::Type& type, strings::ByteSink* output, ErrorListener* listener); - virtual ~ProtoWriter(); + virtual ~ProtoWriter() override; // ObjectWriter methods. ProtoWriter* StartObject(StringPiece name) override; @@ -110,7 +110,7 @@ class LIBPROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { return RenderDataPiece(name, DataPiece(value, use_strict_base64_decoding())); } - virtual ProtoWriter* RenderBytes(StringPiece name, StringPiece value) { + ProtoWriter* RenderBytes(StringPiece name, StringPiece value) override { return RenderDataPiece( name, DataPiece(value, false, use_strict_base64_decoding())); } @@ -163,7 +163,7 @@ class LIBPROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { ProtoElement(ProtoElement* parent, const google::protobuf::Field* field, const google::protobuf::Type& type, bool is_list); - virtual ~ProtoElement() {} + virtual ~ProtoElement() override {} // Called just before the destructor for clean up: // - reports any missing required fields @@ -183,9 +183,9 @@ class LIBPROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { void RegisterField(const google::protobuf::Field* field); // To report location on error messages. - virtual string ToString() const; + virtual string ToString() const override; - virtual ProtoElement* parent() const { + virtual ProtoElement* parent() const override { return static_cast<ProtoElement*>(BaseElement::parent()); } |