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

clang-format 13 #76

Merged
merged 1 commit into from
May 11, 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 libamqpprox/amqpprox_authcontrolcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ std::string AuthControlCommand::helpText() const
}

void AuthControlCommand::handleCommand(const std::string & /* command */,
const std::string & restOfCommand,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Server *serverHandle,
Control * /* controlHandle */)
{
ControlCommandOutput<OutputFunctor> output(outputFunctor);
Expand Down
8 changes: 4 additions & 4 deletions libamqpprox/amqpprox_authcontrolcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ class AuthControlCommand : public ControlCommand {
* \param serverHandle access to the Server object
* \param controlHandle access to the Control object
*/
virtual void handleCommand(const std::string & command,
const std::string & restOfCommand,
virtual void handleCommand(const std::string &command,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Control * controlHandle) override;
Server *serverHandle,
Control *controlHandle) override;
};

}
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_authinterceptinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AuthInterceptInterface {
* \param responseCb Callbak function with response values
*/
virtual void authenticate(const authproto::AuthRequest authRequestData,
const ReceiveResponseCb & responseCb) = 0;
const ReceiveResponseCb &responseCb) = 0;

// ACCESSORS
/**
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_backendcontrolcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ std::string BackendControlCommand::helpText() const
}

void BackendControlCommand::handleCommand(const std::string & /* command */,
const std::string & restOfCommand,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * /* serverHandle */,
Control *controlHandle)
Expand Down
8 changes: 4 additions & 4 deletions libamqpprox/amqpprox_backendcontrolcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ class BackendControlCommand : public ControlCommand {
* \param serverHandle Server handle
* \param controlHandle Control handle
*/
virtual void handleCommand(const std::string & command,
const std::string & restOfCommand,
virtual void handleCommand(const std::string &command,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Control * controlHandle) override;
Server *serverHandle,
Control *controlHandle) override;
};

}
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_backendselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BackendSelector {
* If no `Backend` is suitable based on the specified values, a null
* pointer will be returned.
*/
virtual const Backend *select(BackendSet * backendSet,
virtual const Backend *select(BackendSet *backendSet,
const std::vector<uint64_t> &markers,
uint64_t retryCount) const = 0;

Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace amqpprox {
* \brief Represents IO buffer
*/
class Buffer {
char * d_data;
char *d_data;
std::size_t d_length;
std::size_t d_offset;

Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_bufferhandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BufferSource;
* be switched at a later time with minimal changes.
*/
class BufferHandle {
void * d_data;
void *d_data;
std::size_t d_size;
BufferSource *d_source;

Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_bufferpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class BufferPool {
* each buffer size in the pool.
*/
void getPoolStatistics(std::vector<BufferAllocationStat> *stats,
uint64_t * spilloverCount);
uint64_t *spilloverCount);
};

}
Expand Down
4 changes: 2 additions & 2 deletions libamqpprox/amqpprox_connectionmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ConnectionManager {
// DATA
std::shared_ptr<BackendSet> d_backendSet;
std::vector<BackendSet::Marker> d_markerSnapshot;
BackendSelector * d_backendSelector_p; // HELD NOT OWNED
BackendSelector *d_backendSelector_p; // HELD NOT OWNED

public:
// CREATORS
Expand All @@ -63,7 +63,7 @@ class ConnectionManager {
* \param backendSelector Backend selector
*/
ConnectionManager(std::shared_ptr<BackendSet> backendSet,
BackendSelector * backendSelector);
BackendSelector *backendSelector);

// ACCESSORS
/**
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_connectionscontrolcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void ConnectionsControlCommand::handleCommand(
const std::string & /* command */,
const std::string & /* restOfCommand */,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Server *serverHandle,
Control * /* controlHandle */)
{
ControlCommandOutput<OutputFunctor> output(outputFunctor);
Expand Down
8 changes: 4 additions & 4 deletions libamqpprox/amqpprox_connectionscontrolcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class ConnectionsControlCommand : public ControlCommand {
* \param serverHandle Server handle
* \param controlHandle Control handle
*/
virtual void handleCommand(const std::string & command,
const std::string & restOfCommand,
virtual void handleCommand(const std::string &command,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Control * controlHandle) override;
Server *serverHandle,
Control *controlHandle) override;
};

}
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_connectionselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ConnectionSelector {
*/
virtual int
acquireConnection(std::shared_ptr<ConnectionManager> *connectionOut,
const SessionState & state) = 0;
const SessionState &state) = 0;
};

}
Expand Down
12 changes: 6 additions & 6 deletions libamqpprox/amqpprox_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ std::ostream &streamOutMethod(std::ostream &os, const Method &method)
}

template <typename T>
void decodeMethod(T * t,
void decodeMethod(T *t,
const Method &method,
Buffer & buffer,
Buffer &buffer,
FlowType direction)
{
if (method.methodType != T::methodType()) {
Expand Down Expand Up @@ -102,9 +102,9 @@ const Buffer legacyProtocolHeader(Constants::legacyProtocolHeader(),

}

Connector::Connector(SessionState * sessionState,
EventSource * eventSource,
BufferPool * bufferPool,
Connector::Connector(SessionState *sessionState,
EventSource *eventSource,
BufferPool *bufferPool,
std::string_view localHostname)
: d_state(State::AWAITING_PROTOCOL_HEADER)
, d_synthesizedStart(ConnectorUtil::synthesizedStart())
Expand Down Expand Up @@ -413,7 +413,7 @@ void Connector::sendResponse(const T &response, bool sendToIngressSide)
}
}

void Connector::synthesizeMessage(methods::Close & replyMethod,
void Connector::synthesizeMessage(methods::Close &replyMethod,
bool sendToIngressSide,
uint64_t code,
std::string_view text)
Expand Down
14 changes: 7 additions & 7 deletions libamqpprox/amqpprox_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class Connector {
methods::OpenOk d_openOk;
methods::Close d_close;
methods::CloseOk d_closeOk;
SessionState * d_sessionState_p; // HELD NOT OWNED
EventSource * d_eventSource_p; // HELD NOT OWNED
BufferPool * d_bufferPool_p; // HELD NOT OWNED
SessionState *d_sessionState_p; // HELD NOT OWNED
EventSource *d_eventSource_p; // HELD NOT OWNED
BufferPool *d_bufferPool_p; // HELD NOT OWNED
BufferHandle d_synthesizedReplyBuffer;
Buffer d_buffer;
std::function<void()> d_connectionCreationHandler;
Expand All @@ -102,15 +102,15 @@ class Connector {
template <typename T>
void sendResponse(const T &response, bool sendToIngressSide);

inline void synthesizeMessage(methods::Close & replyMethod,
inline void synthesizeMessage(methods::Close &replyMethod,
bool sendToIngressSide,
uint64_t code,
std::string_view text);

public:
Connector(SessionState * sessionState,
EventSource * eventSource,
BufferPool * bufferPool,
Connector(SessionState *sessionState,
EventSource *eventSource,
BufferPool *bufferPool,
std::string_view localHostname);

/**
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_connectorutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ FieldTable ConnectorUtil::generateServerProperties()
return ft;
}

void ConnectorUtil::injectProxyClientIdent(methods::StartOk * startOk,
void ConnectorUtil::injectProxyClientIdent(methods::StartOk *startOk,
const std::string &clientHostname,
int clientRemotePort,
std::string_view localHostname,
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_connectorutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ConnectorUtil {
* \param isIngressSecured Represents ingress connection is secured (TLS
* enabled)
*/
static void injectProxyClientIdent(methods::StartOk * startOk,
static void injectProxyClientIdent(methods::StartOk *startOk,
const std::string &clientHostname,
int clientRemotePort,
std::string_view localHostname,
Expand Down
18 changes: 9 additions & 9 deletions libamqpprox/amqpprox_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ namespace amqpprox {
*/
class ControlSession : public std::enable_shared_from_this<ControlSession> {
stream_protocol::socket d_socket;
Server * d_server_p;
Control * d_control_p;
EventSource * d_eventSource_p;
Server *d_server_p;
Control *d_control_p;
EventSource *d_eventSource_p;
boost::asio::streambuf d_streamBuf;
bool d_finished;

public:
ControlSession(stream_protocol::socket socket,
Server * server,
Control * control,
EventSource * eventSource)
Server *server,
Control *control,
EventSource *eventSource)
: d_socket(std::move(socket))
, d_server_p(server)
, d_control_p(control)
Expand Down Expand Up @@ -156,8 +156,8 @@ class ControlSession : public std::enable_shared_from_this<ControlSession> {
}
};

Control::Control(Server * server,
EventSource * source,
Control::Control(Server *server,
EventSource *source,
const std::string &udsPath)
: d_server_p(server)
, d_eventSource_p(source)
Expand Down Expand Up @@ -188,7 +188,7 @@ void Control::stop()

void Control::scheduleRecurringEvent(
int intervalMs,
const std::string & name,
const std::string &name,
const std::function<bool(Control *, Server *)> &event)
{
auto duration = boost::posix_time::milliseconds(intervalMs);
Expand Down
6 changes: 3 additions & 3 deletions libamqpprox/amqpprox_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class Server;
* \brief Class for running control service
*/
class Control {
Server * d_server_p;
EventSource * d_eventSource_p;
Server *d_server_p;
EventSource *d_eventSource_p;
boost::asio::io_service d_ioService;
boost::asio::local::stream_protocol::acceptor d_acceptor;
boost::asio::local::stream_protocol::socket d_socket;
Expand Down Expand Up @@ -65,7 +65,7 @@ class Control {
*/
void scheduleRecurringEvent(
int intervalMs,
const std::string & name,
const std::string &name,
const std::function<bool(Control *, Server *)> &event);

/**
Expand Down
8 changes: 4 additions & 4 deletions libamqpprox/amqpprox_controlcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ class ControlCommand {
* \param serverHandle Server handle
* \param controlHandle Control handle
*/
virtual void handleCommand(const std::string & command,
const std::string & restOfCommand,
virtual void handleCommand(const std::string &command,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Control * controlHandle) = 0;
Server *serverHandle,
Control *controlHandle) = 0;

// ACCESSORS
/**
Expand Down
6 changes: 3 additions & 3 deletions libamqpprox/amqpprox_datacentercontrolcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Bloomberg {
namespace amqpprox {

DatacenterControlCommand::DatacenterControlCommand(Datacenter *datacenter,
FarmStore * farmStore)
FarmStore *farmStore)
: d_datacenter_p(datacenter)
, d_farmStore_p(farmStore)
{
Expand All @@ -46,9 +46,9 @@ std::string DatacenterControlCommand::helpText() const

void DatacenterControlCommand::handleCommand(
const std::string & /* command */,
const std::string & restOfCommand,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Server *serverHandle,
Control * /* controlHandle */)
{
ControlCommandOutput<OutputFunctor> output(outputFunctor);
Expand Down
10 changes: 5 additions & 5 deletions libamqpprox/amqpprox_datacentercontrolcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DatacenterControlCommand : public ControlCommand {
private:
// DATA
Datacenter *d_datacenter_p;
FarmStore * d_farmStore_p;
FarmStore *d_farmStore_p;

public:
// CREATORS
Expand Down Expand Up @@ -64,11 +64,11 @@ class DatacenterControlCommand : public ControlCommand {
* \param serverHandle access to the Server object
* \param controlHandle access to the Control object
*/
virtual void handleCommand(const std::string & command,
const std::string & restOfCommand,
virtual void handleCommand(const std::string &command,
const std::string &restOfCommand,
const OutputFunctor &outputFunctor,
Server * serverHandle,
Control * controlHandle) override;
Server *serverHandle,
Control *controlHandle) override;
};

}
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_dnshostnamemapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DNSHostnameMapper::DNSHostnameMapper()
}

void DNSHostnameMapper::prime(
boost::asio::io_service & ioService,
boost::asio::io_service &ioService,
std::initializer_list<boost::asio::ip::tcp::endpoint> endpoints)
{
boost::asio::ip::tcp::resolver resolver(ioService);
Expand Down
2 changes: 1 addition & 1 deletion libamqpprox/amqpprox_dnshostnamemapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DNSHostnameMapper : public HostnameMapper {
* \param ioService handle to the boost asio service
* \param endpoints list of endpoints to prime the cache with
*/
void prime(boost::asio::io_service & ioService,
void prime(boost::asio::io_service &ioService,
std::initializer_list<boost::asio::ip::tcp::endpoint> endpoints)
override;

Expand Down
4 changes: 2 additions & 2 deletions libamqpprox/amqpprox_dnsresolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void DNSResolver::setCacheTimeout(int timeoutMs)
d_cacheTimeout = timeoutMs;
}

void DNSResolver::setCachedResolution(const std::string & query_host,
const std::string & query_service,
void DNSResolver::setCachedResolution(const std::string &query_host,
const std::string &query_service,
std::vector<TcpEndpoint> &&resolution)
{
std::lock_guard lg(d_cacheLock);
Expand Down
Loading