remove trailing whitespace
diff --git a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
index 25680a1..c45a964 100644
--- a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
+++ b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
@@ -80,7 +80,7 @@
if (state_ != uninitialized) {
return;
}
-
+
// Create reference
shared_ptr<BoostThread>* selfRef = new shared_ptr<BoostThread>();
*selfRef = self_.lock();
diff --git a/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
index 1fdefd5..6014b32 100644
--- a/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
+++ b/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
@@ -81,7 +81,7 @@
if (state_ != uninitialized) {
return;
}
-
+
boost::shared_ptr<StdThread> selfRef = shared_from_this();
state_ = starting;
diff --git a/lib/cpp/src/thrift/concurrency/ThreadManager.cpp b/lib/cpp/src/thrift/concurrency/ThreadManager.cpp
index 1f897ba..204d5dc 100644
--- a/lib/cpp/src/thrift/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/thrift/concurrency/ThreadManager.cpp
@@ -516,7 +516,7 @@
shared_ptr<ThreadManager::Task> task = tasks_.front();
tasks_.pop();
-
+
return task->getRunnable();
}
diff --git a/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h b/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
index 494ec10..a352d90 100644
--- a/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
+++ b/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
@@ -25,10 +25,10 @@
#include <thrift/TProcessor.h>
#include <boost/tokenizer.hpp>
-namespace apache
-{
- namespace thrift
- {
+namespace apache
+{
+ namespace thrift
+ {
using boost::shared_ptr;
namespace protocol {
@@ -42,7 +42,7 @@
{
public:
StoredMessageProtocol( shared_ptr<protocol::TProtocol> _protocol,
- const std::string& _name, const TMessageType _type,
+ const std::string& _name, const TMessageType _type,
const int32_t _seqid) :
TProtocolDecorator(_protocol),
name(_name),
@@ -53,7 +53,7 @@
uint32_t readMessageBegin_virt(std::string& _name, TMessageType& _type, int32_t& _seqid)
{
-
+
_name = name;
_type = type;
_seqid = seqid;
@@ -109,7 +109,7 @@
* as "handlers", e.g. WeatherReportHandler,
* implementing WeatherReportIf interface.
*/
- void registerProcessor( const std::string & serviceName,
+ void registerProcessor( const std::string & serviceName,
shared_ptr<TProcessor> processor )
{
services[serviceName] = processor;
@@ -125,12 +125,12 @@
* <li>Dispatch to the processor, with a decorated instance of TProtocol
* that allows readMessageBegin() to return the original TMessage.</li>
* </ol>
- *
+ *
* \throws TException If the message type is not T_CALL or T_ONEWAY, if
* the service name was not found in the message, or if the service
- * name was not found in the service map.
+ * name was not found in the service map.
*/
- bool process( shared_ptr<protocol::TProtocol> in,
+ bool process( shared_ptr<protocol::TProtocol> in,
shared_ptr<protocol::TProtocol> out,
void *connectionContext)
{
@@ -144,13 +144,13 @@
in->readMessageBegin(name, type, seqid);
if( type != protocol::T_CALL && type != protocol::T_ONEWAY ) {
- // Unexpected message type.
+ // Unexpected message type.
in->skip(::apache::thrift::protocol::T_STRUCT);
in->readMessageEnd();
in->getTransport()->readEnd();
const std::string msg("TMultiplexedProcessor: Unexpected message type");
::apache::thrift::TApplicationException x(
- ::apache::thrift::TApplicationException::PROTOCOL_ERROR,
+ ::apache::thrift::TApplicationException::PROTOCOL_ERROR,
msg);
out->writeMessageBegin(name, ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(out.get());
@@ -161,7 +161,7 @@
}
// Extract the service name
-
+
boost::tokenizer<boost::char_separator<char> > tok( name, boost::char_separator<char>(":") );
std::vector<std::string> tokens;
@@ -177,24 +177,24 @@
if( it != services.end() )
{
shared_ptr<TProcessor> processor = it->second;
- // Let the processor registered for this service name
+ // Let the processor registered for this service name
// process the message.
- return processor->process(
- shared_ptr<protocol::TProtocol>(
- new protocol::StoredMessageProtocol( in, tokens[1], type, seqid ) ),
+ return processor->process(
+ shared_ptr<protocol::TProtocol>(
+ new protocol::StoredMessageProtocol( in, tokens[1], type, seqid ) ),
out, connectionContext );
}
else
{
- // Unknown service.
+ // Unknown service.
in->skip(::apache::thrift::protocol::T_STRUCT);
in->readMessageEnd();
in->getTransport()->readEnd();
-
+
std::string msg("TMultiplexedProcessor: Unknown service: ");
msg += tokens[0];
::apache::thrift::TApplicationException x(
- ::apache::thrift::TApplicationException::PROTOCOL_ERROR,
+ ::apache::thrift::TApplicationException::PROTOCOL_ERROR,
msg);
out->writeMessageBegin(name, ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(out.get());
@@ -213,6 +213,6 @@
services_t services;
};
}
-}
+}
#endif // THRIFT_TMULTIPLEXEDPROCESSOR_H_
diff --git a/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp b/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp
index a17eacc..756b9b9 100644
--- a/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp
@@ -21,11 +21,11 @@
#include <thrift/processor/TMultiplexedProcessor.h>
#include <thrift/protocol/TProtocolDecorator.h>
-namespace apache
-{
- namespace thrift
- {
- namespace protocol
+namespace apache
+{
+ namespace thrift
+ {
+ namespace protocol
{
uint32_t TMultiplexedProtocol::writeMessageBegin_virt(
const std::string& _name,
diff --git a/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h b/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h
index a59c7b4..e93f371 100644
--- a/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h
+++ b/lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h
@@ -22,11 +22,11 @@
#include <thrift/protocol/TProtocolDecorator.h>
-namespace apache
-{
- namespace thrift
- {
- namespace protocol
+namespace apache
+{
+ namespace thrift
+ {
+ namespace protocol
{
using boost::shared_ptr;
@@ -35,7 +35,7 @@
* that allows a Thrift client to communicate with a multiplexing Thrift server,
* by prepending the service name to the function name during function calls.
*
- * \note THIS IS NOT USED BY SERVERS. On the server, use
+ * \note THIS IS NOT USED BY SERVERS. On the server, use
* {@link apache::thrift::TMultiplexedProcessor TMultiplexedProcessor} to handle requests
* from a multiplexing client.
*
@@ -71,7 +71,7 @@
* \param _protocol Your communication protocol of choice, e.g. <code>TBinaryProtocol</code>.
* \param _serviceName The service name of the service communicating via this protocol.
*/
- TMultiplexedProtocol( shared_ptr<TProtocol> _protocol, const std::string& _serviceName )
+ TMultiplexedProtocol( shared_ptr<TProtocol> _protocol, const std::string& _serviceName )
: TProtocolDecorator(_protocol),
serviceName(_serviceName),
separator(":")
@@ -88,8 +88,8 @@
* \throws TException Passed through from wrapped <code>TProtocol</code> instance.
*/
uint32_t writeMessageBegin_virt(
- const std::string& _name,
- const TMessageType _type,
+ const std::string& _name,
+ const TMessageType _type,
const int32_t _seqid);
private:
const std::string serviceName;
diff --git a/lib/cpp/src/thrift/protocol/TProtocol.h b/lib/cpp/src/thrift/protocol/TProtocol.h
index e8ba429..d4c343d 100644
--- a/lib/cpp/src/thrift/protocol/TProtocol.h
+++ b/lib/cpp/src/thrift/protocol/TProtocol.h
@@ -674,7 +674,7 @@
protected:
TProtocol(boost::shared_ptr<TTransport> ptrans)
- : ptrans_(ptrans)
+ : ptrans_(ptrans)
, recursion_depth_(0)
, recursion_limit_(DEFAULT_RECURSION_LIMIT) {}
diff --git a/lib/cpp/src/thrift/protocol/TProtocolDecorator.h b/lib/cpp/src/thrift/protocol/TProtocolDecorator.h
index 7850bc5..570e977 100644
--- a/lib/cpp/src/thrift/protocol/TProtocolDecorator.h
+++ b/lib/cpp/src/thrift/protocol/TProtocolDecorator.h
@@ -23,40 +23,40 @@
#include <thrift/protocol/TProtocol.h>
#include <boost/shared_ptr.hpp>
-namespace apache
-{
- namespace thrift
- {
- namespace protocol
+namespace apache
+{
+ namespace thrift
+ {
+ namespace protocol
{
using boost::shared_ptr;
/**
* <code>TProtocolDecorator</code> forwards all requests to an enclosed
* <code>TProtocol</code> instance, providing a way to author concise
- * concrete decorator subclasses.
+ * concrete decorator subclasses.
*
* <p>See p.175 of Design Patterns (by Gamma et al.)</p>
- *
+ *
* @see apache::thrift::protocol::TMultiplexedProtocol
*/
class TProtocolDecorator : public TProtocol
{
public:
virtual ~TProtocolDecorator() {}
-
+
// Desc: Initializes the protocol decorator object.
- TProtocolDecorator( shared_ptr<TProtocol> proto )
+ TProtocolDecorator( shared_ptr<TProtocol> proto )
: TProtocol(proto->getTransport()), protocol(proto)
{
}
virtual uint32_t writeMessageBegin_virt(
- const std::string& name,
- const TMessageType messageType,
+ const std::string& name,
+ const TMessageType messageType,
const int32_t seqid)
{
- return protocol->writeMessageBegin(name, messageType, seqid);
+ return protocol->writeMessageBegin(name, messageType, seqid);
}
virtual uint32_t writeMessageEnd_virt() { return protocol->writeMessageEnd(); }
virtual uint32_t writeStructBegin_virt(const char* name) { return protocol->writeStructBegin(name); }
@@ -111,7 +111,7 @@
virtual uint32_t readBool_virt(bool& value) { return protocol->readBool(value); }
virtual uint32_t readBool_virt(std::vector<bool>::reference value) { return protocol->readBool(value); }
-
+
virtual uint32_t readByte_virt(int8_t& byte) { return protocol->readByte(byte); }
virtual uint32_t readI16_virt(int16_t& i16) { return protocol->readI16(i16); }
@@ -124,10 +124,10 @@
virtual uint32_t readBinary_virt(std::string& str) { return protocol->readBinary(str); }
private:
- shared_ptr<TProtocol> protocol;
+ shared_ptr<TProtocol> protocol;
};
}
}
-}
+}
#endif // THRIFT_TPROTOCOLDECORATOR_H_
diff --git a/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp b/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
index 3a3e222..2c82847 100644
--- a/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
+++ b/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
@@ -25,7 +25,7 @@
#include <thrift/transport/TBufferTransports.h>
using boost::shared_ptr;
-
+
namespace apache { namespace thrift { namespace transport {
TQIODeviceTransport::TQIODeviceTransport(shared_ptr<QIODevice> dev)
diff --git a/lib/cpp/src/thrift/qt/TQIODeviceTransport.h b/lib/cpp/src/thrift/qt/TQIODeviceTransport.h
index 64faa12..c5221dd 100644
--- a/lib/cpp/src/thrift/qt/TQIODeviceTransport.h
+++ b/lib/cpp/src/thrift/qt/TQIODeviceTransport.h
@@ -55,7 +55,7 @@
private:
TQIODeviceTransport(const TQIODeviceTransport&);
TQIODeviceTransport& operator=(const TQIODeviceTransport&);
-
+
boost::shared_ptr<QIODevice> dev_;
};
}}} // apache::thrift::transport
diff --git a/lib/cpp/src/thrift/qt/TQTcpServer.cpp b/lib/cpp/src/thrift/qt/TQTcpServer.cpp
index 79a8c59..2b3cf98 100644
--- a/lib/cpp/src/thrift/qt/TQTcpServer.cpp
+++ b/lib/cpp/src/thrift/qt/TQTcpServer.cpp
@@ -80,11 +80,11 @@
// when the QTcpServer is destroyed, but any real app should delete this
// class before deleting the QTcpServer that we are using
shared_ptr<QTcpSocket> connection(server_->nextPendingConnection());
-
+
shared_ptr<TTransport> transport;
shared_ptr<TProtocol> iprot;
shared_ptr<TProtocol> oprot;
-
+
try {
transport = shared_ptr<TTransport>(new TQIODeviceTransport(connection));
iprot = shared_ptr<TProtocol>(pfact_->getProtocol(transport));
@@ -93,13 +93,13 @@
qWarning("[TQTcpServer] Failed to initialize transports/protocols");
continue;
}
-
+
ctxMap_[connection.get()] =
shared_ptr<ConnectionContext>(
new ConnectionContext(connection, transport, iprot, oprot));
-
+
connect(connection.get(), SIGNAL(readyRead()), SLOT(beginDecode()));
-
+
// need to use QueuedConnection since we will be deleting the socket in the slot
connect(connection.get(), SIGNAL(disconnected()), SLOT(socketClosed()),
Qt::QueuedConnection);
@@ -115,9 +115,9 @@
qWarning("[TQTcpServer] Got data on an unknown QTcpSocket");
return;
}
-
+
shared_ptr<ConnectionContext> ctx = ctxMap_[connection];
-
+
try {
processor_->process(
bind(&TQTcpServer::finish, this,
@@ -142,7 +142,7 @@
qWarning("[TQTcpServer] Unknown QTcpSocket closed");
return;
}
-
+
ctxMap_.erase(connection);
}
diff --git a/lib/cpp/src/thrift/qt/TQTcpServer.h b/lib/cpp/src/thrift/qt/TQTcpServer.h
index 12a450f..edee2c1 100644
--- a/lib/cpp/src/thrift/qt/TQTcpServer.h
+++ b/lib/cpp/src/thrift/qt/TQTcpServer.h
@@ -55,7 +55,7 @@
private:
TQTcpServer(const TQTcpServer&);
TQTcpServer& operator=(const TQTcpServer&);
-
+
class ConnectionContext;
void finish(boost::shared_ptr<ConnectionContext> ctx, bool healthy);
diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.cpp b/lib/cpp/src/thrift/transport/TBufferTransports.cpp
index 69077f7..15d8f59 100644
--- a/lib/cpp/src/thrift/transport/TBufferTransports.cpp
+++ b/lib/cpp/src/thrift/transport/TBufferTransports.cpp
@@ -303,8 +303,8 @@
rBuf_.reset();
setReadBuffer(rBuf_.get(), rBufSize_);
}
-
- return bytes_read;
+
+ return bytes_read;
}
void TMemoryBuffer::computeRead(uint32_t len, uint8_t** out_start, uint32_t* out_give) {
diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.h b/lib/cpp/src/thrift/transport/TBufferTransports.h
index 71bdd84..5c17d03 100644
--- a/lib/cpp/src/thrift/transport/TBufferTransports.h
+++ b/lib/cpp/src/thrift/transport/TBufferTransports.h
@@ -340,7 +340,7 @@
initPointers();
}
- TFramedTransport(boost::shared_ptr<TTransport> transport, uint32_t sz,
+ TFramedTransport(boost::shared_ptr<TTransport> transport, uint32_t sz,
uint32_t bufReclaimThresh = std::numeric_limits<uint32_t>::max())
: transport_(transport)
, rBufSize_(0)
diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.h b/lib/cpp/src/thrift/transport/TSSLSocket.h
index 168390e..7c19206 100644
--- a/lib/cpp/src/thrift/transport/TSSLSocket.h
+++ b/lib/cpp/src/thrift/transport/TSSLSocket.h
@@ -30,7 +30,7 @@
class AccessManager;
class SSLContext;
-
+
enum SSLProtocol {
SSLTLS = 0, // Supports SSLv3 and TLSv1.
//SSLv2 = 1, // HORRIBLY INSECURE!
diff --git a/lib/cpp/src/thrift/transport/TZlibTransport.h b/lib/cpp/src/thrift/transport/TZlibTransport.h
index dd9dd14..565ecaa 100644
--- a/lib/cpp/src/thrift/transport/TZlibTransport.h
+++ b/lib/cpp/src/thrift/transport/TZlibTransport.h
@@ -60,7 +60,7 @@
};
/**
- * This transport uses zlib to compress on write and decompress on read
+ * This transport uses zlib to compress on write and decompress on read
*
* TODO(dreiss): Don't do an extra copy of the compressed data if
* the underlying transport is TBuffered or TMemory.
@@ -68,7 +68,7 @@
*/
class TZlibTransport : public TVirtualTransport<TZlibTransport> {
public:
-
+
/**
* @param transport The transport to read compressed data from
* and write compressed data to.