Skip to content

Commit 47db428

Browse files
Quuxplusoneedenhill
authored andcommitted
rdkafkacpp: Remove bogus semicolons after function bodies. NFC.
Cascading changes due to the clang-format commit hook.
1 parent f8830a2 commit 47db428

File tree

3 files changed

+37
-25
lines changed

3 files changed

+37
-25
lines changed

src-cpp/HandleImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,4 @@ void update_partitions_from_c_parts(
419419
}
420420
}
421421

422-
}; // namespace RdKafka
422+
} // namespace RdKafka

src-cpp/MetadataImpl.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@
3030

3131
using namespace RdKafka;
3232

33-
BrokerMetadata::~BrokerMetadata() {};
34-
PartitionMetadata::~PartitionMetadata() {};
35-
TopicMetadata::~TopicMetadata() {};
36-
Metadata::~Metadata() {};
33+
BrokerMetadata::~BrokerMetadata() {
34+
}
35+
PartitionMetadata::~PartitionMetadata() {
36+
}
37+
TopicMetadata::~TopicMetadata() {
38+
}
39+
Metadata::~Metadata() {
40+
}
3741

3842

3943
/**
@@ -101,7 +105,8 @@ class PartitionMetadataImpl : public PartitionMetadata {
101105
return &isrs_;
102106
}
103107

104-
~PartitionMetadataImpl() {};
108+
~PartitionMetadataImpl() {
109+
}
105110

106111
private:
107112
const rd_kafka_metadata_partition_t *partition_metadata_;

src-cpp/rdkafkacpp_int.h

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,16 @@ class ErrorImpl : public Error {
117117
public:
118118
~ErrorImpl() {
119119
rd_kafka_error_destroy(c_error_);
120-
};
120+
}
121121

122122
ErrorImpl(ErrorCode code, const std::string *errstr) {
123123
c_error_ = rd_kafka_error_new(static_cast<rd_kafka_resp_err_t>(code),
124124
errstr ? "%s" : NULL,
125125
errstr ? errstr->c_str() : NULL);
126126
}
127127

128-
ErrorImpl(rd_kafka_error_t *c_error) : c_error_(c_error) {};
128+
ErrorImpl(rd_kafka_error_t *c_error) : c_error_(c_error) {
129+
}
129130

130131
static Error *create(ErrorCode code, const std::string *errstr) {
131132
return new ErrorImpl(code, errstr);
@@ -161,7 +162,8 @@ class ErrorImpl : public Error {
161162

162163
class EventImpl : public Event {
163164
public:
164-
~EventImpl() {};
165+
~EventImpl() {
166+
}
165167

166168
EventImpl(Type type,
167169
ErrorCode err,
@@ -175,7 +177,8 @@ class EventImpl : public Event {
175177
str_(str),
176178
id_(0),
177179
throttle_time_(0),
178-
fatal_(false) {};
180+
fatal_(false) {
181+
}
179182

180183
EventImpl(Type type) :
181184
type_(type),
@@ -185,7 +188,8 @@ class EventImpl : public Event {
185188
str_(""),
186189
id_(0),
187190
throttle_time_(0),
188-
fatal_(false) {};
191+
fatal_(false) {
192+
}
189193

190194
Type type() const {
191195
return type_;
@@ -379,7 +383,7 @@ class MessageImpl : public Message {
379383
delete key_;
380384
if (headers_)
381385
delete headers_;
382-
};
386+
}
383387

384388
MessageImpl(rd_kafka_type_t rk_type,
385389
RdKafka::Topic *topic,
@@ -495,7 +499,7 @@ class MessageImpl : public Message {
495499

496500
void *msg_opaque() const {
497501
return rkmessage_->_private;
498-
};
502+
}
499503

500504
int64_t latency() const {
501505
return rd_kafka_message_latency(rkmessage_);
@@ -990,11 +994,13 @@ class ConfImpl : public Conf {
990994

991995
class HandleImpl : virtual public Handle {
992996
public:
993-
~HandleImpl() {};
994-
HandleImpl() {};
997+
~HandleImpl() {
998+
}
999+
HandleImpl() {
1000+
}
9951001
std::string name() const {
9961002
return std::string(rd_kafka_name(rk_));
997-
};
1003+
}
9981004
std::string memberid() const {
9991005
char *str = rd_kafka_memberid(rk_);
10001006
std::string memberid = str ? str : "";
@@ -1004,10 +1010,10 @@ class HandleImpl : virtual public Handle {
10041010
}
10051011
int poll(int timeout_ms) {
10061012
return rd_kafka_poll(rk_, timeout_ms);
1007-
};
1013+
}
10081014
int outq_len() {
10091015
return rd_kafka_outq_len(rk_);
1010-
};
1016+
}
10111017

10121018
void set_common_config(const RdKafka::ConfImpl *confimpl);
10131019

@@ -1127,7 +1133,7 @@ class HandleImpl : virtual public Handle {
11271133
ErrorCode oauthbearer_set_token_failure(const std::string &errstr) {
11281134
return static_cast<ErrorCode>(
11291135
rd_kafka_oauthbearer_set_token_failure(rk_, errstr.c_str()));
1130-
};
1136+
}
11311137

11321138
Error *sasl_background_callbacks_enable() {
11331139
rd_kafka_error_t *c_error = rd_kafka_sasl_background_callbacks_enable(rk_);
@@ -1140,11 +1146,11 @@ class HandleImpl : virtual public Handle {
11401146

11411147
void *mem_malloc(size_t size) {
11421148
return rd_kafka_mem_malloc(rk_, size);
1143-
};
1149+
}
11441150

11451151
void mem_free(void *ptr) {
11461152
rd_kafka_mem_free(rk_, ptr);
1147-
};
1153+
}
11481154

11491155
rd_kafka_t *rk_;
11501156
/* All Producer and Consumer callbacks must reside in HandleImpl and
@@ -1201,7 +1207,8 @@ class TopicImpl : public Topic {
12011207
*/
12021208
class TopicPartitionImpl : public TopicPartition {
12031209
public:
1204-
~TopicPartitionImpl() {};
1210+
~TopicPartitionImpl() {
1211+
}
12051212

12061213
static TopicPartition *create(const std::string &topic, int partition);
12071214

@@ -1371,7 +1378,7 @@ class KafkaConsumerImpl : virtual public KafkaConsumer,
13711378

13721379
bool closed() {
13731380
return rd_kafka_consumer_closed(rk_) ? true : false;
1374-
};
1381+
}
13751382

13761383
ErrorCode seek(const TopicPartition &partition, int timeout_ms);
13771384

@@ -1420,7 +1427,7 @@ class ConsumerImpl : virtual public Consumer, virtual public HandleImpl {
14201427
~ConsumerImpl() {
14211428
if (rk_)
14221429
rd_kafka_destroy(rk_);
1423-
};
1430+
}
14241431
static Consumer *create(Conf *conf, std::string &errstr);
14251432

14261433
ErrorCode start(Topic *topic, int32_t partition, int64_t offset);
@@ -1453,7 +1460,7 @@ class ProducerImpl : virtual public Producer, virtual public HandleImpl {
14531460
~ProducerImpl() {
14541461
if (rk_)
14551462
rd_kafka_destroy(rk_);
1456-
};
1463+
}
14571464

14581465
ErrorCode produce(Topic *topic,
14591466
int32_t partition,

0 commit comments

Comments
 (0)