You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ja...@apache.org on 2022/08/25 08:20:05 UTC
[incubator-brpc] branch master updated: handle override related warnings
This is an automated email from the ASF dual-hosted git repository.
jamesge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new ef50cd19 handle override related warnings
ef50cd19 is described below
commit ef50cd193cac4d0ef8c2b5a67e9cf0e2e28ae436
Author: gejun.0 <ge...@bytedance.com>
AuthorDate: Thu Aug 25 16:18:34 2022 +0800
handle override related warnings
---
src/brpc/esp_message.h | 18 +++++++++---------
src/brpc/memcache.h | 42 +++++++++++++++++++++---------------------
src/brpc/nshead_message.h | 18 +++++++++---------
src/brpc/redis.h | 40 ++++++++++++++++++++--------------------
src/brpc/serialized_request.h | 22 +++++++++++-----------
src/brpc/thrift_message.h | 20 ++++++++++----------
6 files changed, 80 insertions(+), 80 deletions(-)
diff --git a/src/brpc/esp_message.h b/src/brpc/esp_message.h
index a17fd917..1c24707b 100644
--- a/src/brpc/esp_message.h
+++ b/src/brpc/esp_message.h
@@ -53,25 +53,25 @@ public:
// implements Message ----------------------------------------------
- EspMessage* New() const;
+ EspMessage* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
EspMessage* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const EspMessage& from);
void MergeFrom(const EspMessage& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::io::CodedOutputStream* output) const override;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return ByteSize(); }
+ ::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return ByteSize(); }
protected:
::google::protobuf::Metadata GetMetadata() const override;
diff --git a/src/brpc/memcache.h b/src/brpc/memcache.h
index ab464573..d0aaa542 100644
--- a/src/brpc/memcache.h
+++ b/src/brpc/memcache.h
@@ -89,24 +89,24 @@ public:
const butil::IOBuf& raw_buffer() const { return _buf; }
// Protobuf methods.
- MemcacheRequest* New() const;
+ MemcacheRequest* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
MemcacheRequest* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const MemcacheRequest& from);
void MergeFrom(const MemcacheRequest& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
+ ::google::protobuf::io::CodedOutputStream* output) const override;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return _cached_size_; }
static const ::google::protobuf::Descriptor* descriptor();
@@ -124,7 +124,7 @@ private:
void SharedCtor();
void SharedDtor();
- void SetCachedSize(int size) const;
+ void SetCachedSize(int size) const override;
int _pipelined_count;
butil::IOBuf _buf;
@@ -202,29 +202,29 @@ public:
// implements Message ----------------------------------------------
- MemcacheResponse* New() const;
+ MemcacheResponse* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
MemcacheResponse* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const MemcacheResponse& from);
void MergeFrom(const MemcacheResponse& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
+ ::google::protobuf::io::CodedOutputStream* output) const override;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return _cached_size_; }
static const ::google::protobuf::Descriptor* descriptor();
protected:
- ::google::protobuf::Metadata GetMetadata() const;
+ ::google::protobuf::Metadata GetMetadata() const override;
private:
bool PopCounter(uint8_t command, uint64_t* new_value, uint64_t* cas_value);
@@ -232,7 +232,7 @@ private:
void SharedCtor();
void SharedDtor();
- void SetCachedSize(int size) const;
+ void SetCachedSize(int size) const override;
std::string _err;
butil::IOBuf _buf;
diff --git a/src/brpc/nshead_message.h b/src/brpc/nshead_message.h
index de8810ff..ffa81e67 100644
--- a/src/brpc/nshead_message.h
+++ b/src/brpc/nshead_message.h
@@ -49,24 +49,24 @@ public:
// implements Message ----------------------------------------------
- NsheadMessage* New() const;
+ NsheadMessage* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
NsheadMessage* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const NsheadMessage& from);
void MergeFrom(const NsheadMessage& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return ByteSize(); }
+ ::google::protobuf::io::CodedOutputStream* output) const override;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return ByteSize(); }
protected:
::google::protobuf::Metadata GetMetadata() const override;
diff --git a/src/brpc/redis.h b/src/brpc/redis.h
index dfaa25dc..9abfbe95 100644
--- a/src/brpc/redis.h
+++ b/src/brpc/redis.h
@@ -107,24 +107,24 @@ public:
bool SerializeTo(butil::IOBuf* buf) const;
// Protobuf methods.
- RedisRequest* New() const;
+ RedisRequest* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
RedisRequest* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const RedisRequest& from);
void MergeFrom(const RedisRequest& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
+ ::google::protobuf::io::CodedOutputStream* output) const override;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return _cached_size_; }
static const ::google::protobuf::Descriptor* descriptor();
@@ -136,7 +136,7 @@ protected:
private:
void SharedCtor();
void SharedDtor();
- void SetCachedSize(int size) const;
+ void SetCachedSize(int size) const override;
bool AddCommandWithArgs(const char* fmt, ...);
int _ncommand; // # of valid commands
@@ -180,24 +180,24 @@ public:
// implements Message ----------------------------------------------
- RedisResponse* New() const;
+ RedisResponse* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
RedisResponse* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const RedisResponse& from);
void MergeFrom(const RedisResponse& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return _cached_size_; }
+ ::google::protobuf::io::CodedOutputStream* output) const override;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return _cached_size_; }
static const ::google::protobuf::Descriptor* descriptor();
@@ -207,7 +207,7 @@ protected:
private:
void SharedCtor();
void SharedDtor();
- void SetCachedSize(int size) const;
+ void SetCachedSize(int size) const override;
RedisReply _first_reply;
RedisReply* _other_replies;
diff --git a/src/brpc/serialized_request.h b/src/brpc/serialized_request.h
index 2e30dde9..02d83e32 100644
--- a/src/brpc/serialized_request.h
+++ b/src/brpc/serialized_request.h
@@ -43,34 +43,34 @@ public:
// implements Message ----------------------------------------------
- SerializedRequest* New() const;
+ SerializedRequest* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
SerializedRequest* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const SerializedRequest& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
- int GetCachedSize() const { return (int)_serialized.size(); }
+ int GetCachedSize() const override { return (int)_serialized.size(); }
butil::IOBuf& serialized_data() { return _serialized; }
const butil::IOBuf& serialized_data() const { return _serialized; }
protected:
- ::google::protobuf::Metadata GetMetadata() const;
+ ::google::protobuf::Metadata GetMetadata() const override;
private:
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::io::CodedOutputStream* output) const override;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* output) const;
- void MergeFrom(const ::google::protobuf::Message& from);
+ ::google::protobuf::uint8* output) const override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void MergeFrom(const SerializedRequest& from);
void SharedCtor();
void SharedDtor();
- void SetCachedSize(int size) const;
+ void SetCachedSize(int size) const override;
private:
butil::IOBuf _serialized;
diff --git a/src/brpc/thrift_message.h b/src/brpc/thrift_message.h
index 8d39548d..e9a7a3af 100644
--- a/src/brpc/thrift_message.h
+++ b/src/brpc/thrift_message.h
@@ -83,27 +83,27 @@ public:
// implements Message ----------------------------------------------
- ThriftFramedMessage* New() const;
+ ThriftFramedMessage* New() const override;
#if GOOGLE_PROTOBUF_VERSION >= 3006000
ThriftFramedMessage* New(::google::protobuf::Arena* arena) const override;
#endif
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ::google::protobuf::Message& from) override;
+ void MergeFrom(const ::google::protobuf::Message& from) override;
void CopyFrom(const ThriftFramedMessage& from);
void MergeFrom(const ThriftFramedMessage& from);
- void Clear();
- bool IsInitialized() const;
+ void Clear() override;
+ bool IsInitialized() const override;
int ByteSize() const;
bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
+ ::google::protobuf::io::CodedInputStream* input) override;
void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
- int GetCachedSize() const { return ByteSize(); }
+ ::google::protobuf::io::CodedOutputStream* output) const override;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const override;
+ int GetCachedSize() const override { return ByteSize(); }
protected:
- ::google::protobuf::Metadata GetMetadata() const;
+ ::google::protobuf::Metadata GetMetadata() const override;
private:
void SharedCtor();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org