Skip to content

Commit e1b586e

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal. Id] 8928503 -- modernize-concat-nested-namespaces in fbcode/thrift/lib/cpp/transport [B]
Reviewed By: dtolnay Differential Revision: D74774037 fbshipit-source-id: 5e1e64d4e36392c20519eb9b6b382fff49008e47
1 parent dc3d374 commit e1b586e

File tree

12 files changed

+22
-74
lines changed

12 files changed

+22
-74
lines changed

third-party/thrift/src/thrift/lib/cpp/transport/TNullTransport.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121

2222
#include <thrift/lib/cpp/transport/TVirtualTransport.h>
2323

24-
namespace apache {
25-
namespace thrift {
26-
namespace transport {
24+
namespace apache::thrift::transport {
2725

2826
/**
2927
* The null transport is a dummy transport that doesn't actually do anything.
@@ -45,8 +43,6 @@ class TNullTransport : public TVirtualTransport<TNullTransport> {
4543
void write(const uint8_t* /* buf */, uint32_t /* len */) { return; }
4644
};
4745

48-
} // namespace transport
49-
} // namespace thrift
50-
} // namespace apache
46+
} // namespace apache::thrift::transport
5147

5248
#endif // #ifndef _THRIFT_TRANSPORT_TNULLTRANSPORT_H_

third-party/thrift/src/thrift/lib/cpp/transport/TRpcTransport.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ namespace folly {
2323
class SocketAddress;
2424
}
2525

26-
namespace apache {
27-
namespace thrift {
28-
namespace transport {
26+
namespace apache::thrift::transport {
2927

3028
/**
3129
* A TRpcTransport adds a getPeerAddress() method to the base TTransport
@@ -44,8 +42,6 @@ class TRpcTransport : public TTransport {
4442
virtual const folly::SocketAddress* getPeerAddress() = 0;
4543
};
4644

47-
} // namespace transport
48-
} // namespace thrift
49-
} // namespace apache
45+
} // namespace apache::thrift::transport
5046

5147
#endif // THRIFT_TRANSPORT_TRPCTRANSPORT_H_

third-party/thrift/src/thrift/lib/cpp/transport/TShortReadTransport.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
#include <thrift/lib/cpp/transport/TTransport.h>
2323
#include <thrift/lib/cpp/transport/TVirtualTransport.h>
2424

25-
namespace apache {
26-
namespace thrift {
27-
namespace transport {
28-
namespace test {
25+
namespace apache::thrift::transport::test {
2926

3027
/**
3128
* This class is only meant for testing. It wraps another transport.
@@ -74,9 +71,6 @@ class TShortReadTransport : public TVirtualTransport<TShortReadTransport> {
7471
double fullProb_;
7572
};
7673

77-
} // namespace test
78-
} // namespace transport
79-
} // namespace thrift
80-
} // namespace apache
74+
} // namespace apache::thrift::transport::test
8175

8276
#endif // #ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_

third-party/thrift/src/thrift/lib/cpp/transport/TSocket.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
#include <thrift/lib/cpp/transport/TTransportException.h>
3232
#include <thrift/lib/cpp/util/PausableTimer.h>
3333

34-
namespace apache {
35-
namespace thrift {
36-
namespace transport {
34+
namespace apache::thrift::transport {
3735

3836
using namespace std;
3937

@@ -979,6 +977,4 @@ bool TSocket::getUseLowMinRto() {
979977
return useLowMinRto_;
980978
}
981979

982-
} // namespace transport
983-
} // namespace thrift
984-
} // namespace apache
980+
} // namespace apache::thrift::transport

third-party/thrift/src/thrift/lib/cpp/transport/TSocket.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
#include <thrift/lib/cpp/transport/TRpcTransport.h>
2525
#include <thrift/lib/cpp/transport/TVirtualTransport.h>
2626

27-
namespace apache {
28-
namespace thrift {
29-
namespace transport {
27+
namespace apache::thrift::transport {
3028

3129
/**
3230
* TCP Socket implementation of the TTransport interface.
@@ -383,8 +381,6 @@ class TSocket
383381

384382
std::ostream& operator<<(std::ostream& os, const TSocket::Options& o);
385383

386-
} // namespace transport
387-
} // namespace thrift
388-
} // namespace apache
384+
} // namespace apache::thrift::transport
389385

390386
#endif // #ifndef _THRIFT_TRANSPORT_TSOCKET_H_

third-party/thrift/src/thrift/lib/cpp/transport/TTransport.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
#include <thrift/lib/cpp/Thrift.h>
2525
#include <thrift/lib/cpp/transport/TTransportException.h>
2626

27-
namespace apache {
28-
namespace thrift {
29-
namespace transport {
27+
namespace apache::thrift::transport {
3028

3129
/**
3230
* Helper template to hoist readAll implementation out of TTransport
@@ -350,8 +348,6 @@ class TDualTransportFactory : public TDuplexTransportFactory {
350348
std::shared_ptr<TTransportFactory> outputFactory_;
351349
};
352350

353-
} // namespace transport
354-
} // namespace thrift
355-
} // namespace apache
351+
} // namespace apache::thrift::transport
356352

357353
#endif // #ifndef THRIFT_TRANSPORT_TTRANSPORT_H

third-party/thrift/src/thrift/lib/cpp/transport/TTransportException.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,3 @@
1717
#include <thrift/lib/cpp/transport/TTransportException.h>
1818

1919
using std::string;
20-
21-
namespace apache {
22-
namespace thrift {
23-
namespace transport {}
24-
} // namespace thrift
25-
} // namespace apache

third-party/thrift/src/thrift/lib/cpp/transport/TTransportException.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323
#include <thrift/lib/cpp/Thrift.h>
2424

25-
namespace apache {
26-
namespace thrift {
27-
namespace transport {
25+
namespace apache::thrift::transport {
2826

2927
/**
3028
* Class to encapsulate all the possible types of transport errors that may
@@ -200,8 +198,6 @@ class FOLLY_EXPORT TTransportException
200198
int options_;
201199
};
202200

203-
} // namespace transport
204-
} // namespace thrift
205-
} // namespace apache
201+
} // namespace apache::thrift::transport
206202

207203
#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_

third-party/thrift/src/thrift/lib/cpp/transport/TVirtualTransport.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919

2020
#include <thrift/lib/cpp/transport/TTransport.h>
2121

22-
namespace apache {
23-
namespace thrift {
24-
namespace transport {
22+
namespace apache::thrift::transport {
2523

2624
/**
2725
* Helper class that provides default implementations of TTransport methods.
@@ -138,8 +136,6 @@ class TVirtualTransport : public Super_ {
138136
TVirtualTransport(const Arg1_& a1, const Arg2_& a2) : Super_(a1, a2) {}
139137
};
140138

141-
} // namespace transport
142-
} // namespace thrift
143-
} // namespace apache
139+
} // namespace apache::thrift::transport
144140

145141
#endif // #ifndef _THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_

third-party/thrift/src/thrift/lib/cpp/transport/TZlibTransport.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424

2525
using std::string;
2626

27-
namespace apache {
28-
namespace thrift {
29-
namespace transport {
27+
namespace apache::thrift::transport {
3028

3129
// Don't call this outside of the constructor.
3230
void TZlibTransport::initZlib() {
@@ -396,6 +394,4 @@ void TZlibTransport::verifyChecksum() {
396394
"zlib stream");
397395
}
398396

399-
} // namespace transport
400-
} // namespace thrift
401-
} // namespace apache
397+
} // namespace apache::thrift::transport

0 commit comments

Comments
 (0)