Skip to content

Commit 8bdf0d0

Browse files
vgao1996facebook-github-bot
authored andcommitted
apply clang-tidy modernize-use-override
Summary: Use clang-tidy to mechanically add missing `override` and remove redundant `virtual`. Reviewed By: igorsugak Differential Revision: D5211868 fbshipit-source-id: 6a85f7c4a543a4c9345ec5b0681a8853707343dc
1 parent 32a7fec commit 8bdf0d0

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

Sender.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Sender : public WdtBase {
4545
* If the transfer has not finished, then it is aborted. finish() is called to
4646
* wait for threads to end.
4747
*/
48-
virtual ~Sender();
48+
~Sender() override;
4949

5050
/**
5151
* Joins on the threads spawned by start. This has to
@@ -134,7 +134,7 @@ class Sender : public WdtBase {
134134
explicit QueueAbortChecker(Sender *sender) : sender_(sender) {
135135
}
136136

137-
bool shouldAbort() const {
137+
bool shouldAbort() const override {
138138
return (sender_->getTransferStatus() == FINISHED);
139139
}
140140

util/ClientSocket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ClientSocket : public WdtSocket {
2424
/// @return peer-ip of the connected socket
2525
const std::string &getPeerIp() const;
2626
/// shutdown() is now on WdtSocket as shutdownWrites()
27-
virtual ~ClientSocket();
27+
~ClientSocket() override;
2828

2929
protected:
3030
/// sets the send buffer size for this socket

util/DirectorySourceQueue.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ class DirectorySourceQueue : public SourceQueue {
8585
*
8686
* @return next FileByteSource to consume or nullptr when finished
8787
*/
88-
virtual std::unique_ptr<ByteSource> getNextSource(ThreadCtx *callerThreadCtx,
89-
ErrorCode &status) override;
88+
std::unique_ptr<ByteSource> getNextSource(ThreadCtx *callerThreadCtx,
89+
ErrorCode &status) override;
9090

9191
/// @return total number of files processed/enqueued
92-
virtual int64_t getCount() const override;
92+
int64_t getCount() const override;
9393

9494
/// @return total size of files processed/enqueued
95-
virtual int64_t getTotalSize() const override;
95+
int64_t getTotalSize() const override;
9696

9797
/// @return total number of blocks and status of the transfer
9898
std::pair<int64_t, ErrorCode> getNumBlocksAndStatus() const;
@@ -210,7 +210,7 @@ class DirectorySourceQueue : public SourceQueue {
210210
/// @return number of bytes previously sent
211211
int64_t getPreviouslySentBytes() const;
212212

213-
virtual ~DirectorySourceQueue();
213+
~DirectorySourceQueue() override;
214214

215215
/// @return discovered files metadata
216216
std::vector<SourceMetaData *> &getDiscoveredFilesMetaData();

util/FileWriter.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ class FileWriter : public Writer {
2828
fileCreator_(fileCreator) {
2929
}
3030

31-
virtual ~FileWriter() {
31+
~FileWriter() override {
3232
close();
3333
}
3434

3535
/// @see Writer.h
36-
virtual ErrorCode open() override;
36+
ErrorCode open() override;
3737

3838
/// @see Writer.h
39-
virtual ErrorCode write(char *buf, int64_t size) override;
39+
ErrorCode write(char *buf, int64_t size) override;
4040

4141
/// @see Writer.h
42-
virtual int64_t getTotalWritten() override {
42+
int64_t getTotalWritten() override {
4343
return totalWritten_;
4444
}
4545

4646
/// @see Writer.h
47-
virtual void close() override;
47+
void close() override;
4848

4949
private:
5050
/**

util/ServerSocket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ServerSocket : public WdtSocket {
2525
ServerSocket(ThreadCtx &threadCtx, int port, int backlog,
2626
const EncryptionParams &encryptionParams,
2727
int64_t ivChangeInterval, Func &&tagVerificationSuccessCallback);
28-
virtual ~ServerSocket();
28+
~ServerSocket() override;
2929
/// Sets up listening socket (first wildcard type (ipv4 or ipv6 depending
3030
/// on flag)).
3131
ErrorCode listen();

0 commit comments

Comments
 (0)