Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary semicolon #2004

Merged
merged 2 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/asynchronous_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
// Your implementation of example::EchoService
class EchoServiceImpl : public example::EchoService {
public:
EchoServiceImpl() {};
virtual ~EchoServiceImpl() {};
EchoServiceImpl() {}
virtual ~EchoServiceImpl() {}
virtual void Echo(google::protobuf::RpcController* cntl_base,
const example::EchoRequest* request,
example::EchoResponse* response,
Expand Down
2 changes: 1 addition & 1 deletion example/auto_concurrency_limiter/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class EchoServiceImpl : public test::EchoService {
, _running_case(false) {
};

virtual ~EchoServiceImpl() {};
virtual ~EchoServiceImpl() {}

void SetTestCase(const test::TestCase& test_case) {
_test_case = test_case;
Expand Down
4 changes: 2 additions & 2 deletions example/backup_request_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ namespace example {
class SleepyEchoService : public EchoService
, public brpc::Describable {
public:
SleepyEchoService() : _count(0) {};
virtual ~SleepyEchoService() {};
SleepyEchoService() : _count(0) {}
virtual ~SleepyEchoService() {}
virtual void Echo(google::protobuf::RpcController* cntl_base,
const EchoRequest* request,
EchoResponse* response,
Expand Down
4 changes: 2 additions & 2 deletions example/cancel_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
namespace example {
class EchoServiceImpl : public EchoService {
public:
EchoServiceImpl() {};
virtual ~EchoServiceImpl() {};
EchoServiceImpl() {}
virtual ~EchoServiceImpl() {}
virtual void Echo(google::protobuf::RpcController* cntl_base,
const EchoRequest* request,
EchoResponse* response,
Expand Down
4 changes: 2 additions & 2 deletions example/cascade_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ brpc::Channel channel;
namespace example {
class CascadeEchoService : public EchoService {
public:
CascadeEchoService() {};
virtual ~CascadeEchoService() {};
CascadeEchoService() {}
virtual ~CascadeEchoService() {}
virtual void Echo(google::protobuf::RpcController* cntl_base,
const EchoRequest* request,
EchoResponse* response,
Expand Down
2 changes: 1 addition & 1 deletion example/dynamic_partition_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DEFINE_double(max_ratio, 10, "max_sleep / sleep_us");
class EchoServiceImpl : public example::EchoService {
public:
EchoServiceImpl() : _index(0) {}
virtual ~EchoServiceImpl() {};
virtual ~EchoServiceImpl() {}
void set_index(size_t index, int64_t sleep_us) {
_index = index;
_sleep_us = sleep_us;
Expand Down
4 changes: 2 additions & 2 deletions example/echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
namespace example {
class EchoServiceImpl : public EchoService {
public:
EchoServiceImpl() {};
virtual ~EchoServiceImpl() {};
EchoServiceImpl() {}
virtual ~EchoServiceImpl() {}
virtual void Echo(google::protobuf::RpcController* cntl_base,
const EchoRequest* request,
EchoResponse* response,
Expand Down
4 changes: 2 additions & 2 deletions example/grpc_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ DEFINE_bool(gzip, false, "compress body using gzip");

class GreeterImpl : public helloworld::Greeter {
public:
GreeterImpl() {};
virtual ~GreeterImpl() {};
GreeterImpl() {}
virtual ~GreeterImpl() {}
void SayHello(google::protobuf::RpcController* cntl_base,
const helloworld::HelloRequest* req,
helloworld::HelloReply* res,
Expand Down
12 changes: 6 additions & 6 deletions example/http_c++/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace example {
// Service with static path.
class HttpServiceImpl : public HttpService {
public:
HttpServiceImpl() {};
virtual ~HttpServiceImpl() {};
HttpServiceImpl() {}
virtual ~HttpServiceImpl() {}
void Echo(google::protobuf::RpcController* cntl_base,
const HttpRequest*,
HttpResponse*,
Expand All @@ -66,8 +66,8 @@ class HttpServiceImpl : public HttpService {
// Service with dynamic path.
class FileServiceImpl : public FileService {
public:
FileServiceImpl() {};
virtual ~FileServiceImpl() {};
FileServiceImpl() {}
virtual ~FileServiceImpl() {}

struct Args {
butil::intrusive_ptr<brpc::ProgressiveAttachment> pa;
Expand Down Expand Up @@ -116,8 +116,8 @@ class FileServiceImpl : public FileService {
// when adding the service into server).
class QueueServiceImpl : public example::QueueService {
public:
QueueServiceImpl() {};
virtual ~QueueServiceImpl() {};
QueueServiceImpl() {}
virtual ~QueueServiceImpl() {}
void start(google::protobuf::RpcController* cntl_base,
const HttpRequest*,
HttpResponse*,
Expand Down
2 changes: 1 addition & 1 deletion example/multi_threaded_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace example {
class EchoServiceImpl : public EchoService {
public:
EchoServiceImpl() {}
~EchoServiceImpl() {};
~EchoServiceImpl() {}
void Echo(google::protobuf::RpcController* cntl_base,
const EchoRequest* request,
EchoResponse* response,
Expand Down
2 changes: 1 addition & 1 deletion example/multi_threaded_echo_fns_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ DEFINE_double(max_ratio, 10, "max_sleep / sleep_us");
class EchoServiceImpl : public example::EchoService {
public:
EchoServiceImpl() : _index(0) {}
virtual ~EchoServiceImpl() {};
virtual ~EchoServiceImpl() {}
void set_index(size_t index, int64_t sleep_us) {
_index = index;
_sleep_us = sleep_us;
Expand Down
4 changes: 2 additions & 2 deletions example/nshead_pb_extension_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
namespace example {
class EchoServiceImpl : public EchoService {
public:
EchoServiceImpl() {};
virtual ~EchoServiceImpl() {};
EchoServiceImpl() {}
virtual ~EchoServiceImpl() {}
virtual void Echo(google::protobuf::RpcController*,
const EchoRequest* request,
EchoResponse* response,
Expand Down
2 changes: 1 addition & 1 deletion example/parallel_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
class EchoServiceImpl : public example::EchoService {
public:
EchoServiceImpl() {}
~EchoServiceImpl() {};
~EchoServiceImpl() {}
void Echo(google::protobuf::RpcController* cntl_base,
const example::EchoRequest* request,
example::EchoResponse* response,
Expand Down
2 changes: 1 addition & 1 deletion example/partition_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DEFINE_double(max_ratio, 10, "max_sleep / sleep_us");
class EchoServiceImpl : public example::EchoService {
public:
EchoServiceImpl() : _index(0) {}
virtual ~EchoServiceImpl() {};
virtual ~EchoServiceImpl() {}
void set_index(size_t index, int64_t sleep_us) {
_index = index;
_sleep_us = sleep_us;
Expand Down
2 changes: 1 addition & 1 deletion example/rdma_performance/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace test {
class PerfTestServiceImpl : public PerfTestService {
public:
PerfTestServiceImpl() {}
~PerfTestServiceImpl() {};
~PerfTestServiceImpl() {}

void Test(google::protobuf::RpcController* cntl_base,
const PerfTestRequest* request,
Expand Down
2 changes: 1 addition & 1 deletion example/selective_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ DEFINE_double(max_ratio, 10, "max_sleep / sleep_us");
class EchoServiceImpl : public example::EchoService {
public:
EchoServiceImpl() : _index(0) {}
virtual ~EchoServiceImpl() {};
virtual ~EchoServiceImpl() {}
void set_index(size_t index, int64_t sleep_us) {
_index = index;
_sleep_us = sleep_us;
Expand Down
2 changes: 1 addition & 1 deletion example/streaming_echo_c++/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class StreamReceiver : public brpc::StreamInputHandler {
// Your implementation of example::EchoService
class StreamingEchoService : public example::EchoService {
public:
StreamingEchoService() : _sd(brpc::INVALID_STREAM_ID) {};
StreamingEchoService() : _sd(brpc::INVALID_STREAM_ID) {}
virtual ~StreamingEchoService() {
brpc::StreamClose(_sd);
};
Expand Down
2 changes: 1 addition & 1 deletion src/brpc/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Stream;
class SocketUser {
public:
virtual ~SocketUser() {}
virtual void BeforeRecycle(Socket*) {};
virtual void BeforeRecycle(Socket*) {}

// Will be periodically called in a dedicated thread to check the
// health.
Expand Down
2 changes: 1 addition & 1 deletion src/brpc/thrift_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static const int16_t THRIFT_RESPONSE_FID = 0;
// from ThriftMessageBase which can be stored and handled uniformly.
class ThriftMessageBase {
public:
virtual ~ThriftMessageBase() {};
virtual ~ThriftMessageBase() {}
virtual uint32_t Read(::apache::thrift::protocol::TProtocol* iprot) = 0;
virtual uint32_t Write(::apache::thrift::protocol::TProtocol* oprot) const = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion src/bvar/recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace bvar {

struct Stat {
Stat() : sum(0), num(0) {};
Stat() : sum(0), num(0) {}
Stat(int64_t sum2, int64_t num2) : sum(sum2), num(num2) {}
int64_t sum;
int64_t num;
Expand Down
2 changes: 1 addition & 1 deletion tools/rpc_view/rpc_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void handle_response(brpc::Controller* client_cntl,
class ViewServiceImpl : public ViewService {
public:
ViewServiceImpl() {}
virtual ~ViewServiceImpl() {};
virtual ~ViewServiceImpl() {}
virtual void default_method(google::protobuf::RpcController* cntl_base,
const HttpRequest*,
HttpResponse*,
Expand Down
2 changes: 1 addition & 1 deletion tools/trackme_server/trackme_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class TrackMeServiceImpl : public brpc::TrackMeService {
public:
explicit TrackMeServiceImpl(BugsLoader* bugs) : _bugs(bugs) {
}
~TrackMeServiceImpl() {};
~TrackMeServiceImpl() {}
void TrackMe(google::protobuf::RpcController* cntl_base,
const brpc::TrackMeRequest* request,
brpc::TrackMeResponse* response,
Expand Down