refactor: Drop "_" suffix in private vars (cpp)
It just looks ugly, and unnecessary with modern tooling. Plus it's ugly.
This commit is contained in:
1 parent
8499ac0dfb
commit
d11fd23cb0
4 files changed
+27
-27
No files matched your search
@@ -466,18 +466,18 @@ UsdsFuturesGateway::UsdsFuturesGateway(
|
||||
bts::md::SecurityOracle sec_oracle,
|
||||
GatewayConfig session_cfg,
|
||||
bts::config::JetFIX::Connection jetfix_connection)
|
||||
: me_(std::make_unique<PImpl>(
|
||||
: me(std::make_unique<PImpl>(
|
||||
std::move(sec_oracle),
|
||||
std::move(session_cfg),
|
||||
std::move(jetfix_connection))) {
|
||||
bts_assert(
|
||||
me_->config.account.size() <=
|
||||
me->config.account.size() <=
|
||||
ExecutionReport{}.account_name.value().size());
|
||||
}
|
||||
|
||||
UsdsFuturesGateway::~UsdsFuturesGateway() = default;
|
||||
|
||||
void UsdsFuturesGateway::start() { me_->start(); }
|
||||
void UsdsFuturesGateway::start() { me->start(); }
|
||||
|
||||
void UsdsFuturesGateway::on_securities(
|
||||
const bts::mercury::Update<NewSecuritiesEvent> & /*update*/) {
|
||||
@@ -495,19 +495,19 @@ void UsdsFuturesGateway::on_admin_data(
|
||||
return;
|
||||
}
|
||||
const auto *account = bts::admin::AdminServiceUtils::find_account(
|
||||
*update.events->back().admin_data, me_->config.account);
|
||||
*update.events->back().admin_data, me->config.account);
|
||||
if (account == nullptr) {
|
||||
WARN_FN(
|
||||
"on_admin_data",
|
||||
"Gateway account not found. Cannot execute orders. name: '{}'",
|
||||
me_->config.account);
|
||||
me->config.account);
|
||||
return;
|
||||
}
|
||||
if (me_->account.name() == account->name() &&
|
||||
me_->account.id() == account->id()) {
|
||||
if (me->account.name() == account->name() &&
|
||||
me->account.id() == account->id()) {
|
||||
return;
|
||||
}
|
||||
me_->account.CopyFrom(*account);
|
||||
me->account.CopyFrom(*account);
|
||||
INFO_FN("on_admin_data", "Resolved gateway account '{}'", account->name());
|
||||
}
|
||||
|
||||
@@ -517,9 +517,9 @@ void UsdsFuturesGateway::send_msgs(
|
||||
for (const auto &msg : msg_vec) {
|
||||
std::visit(
|
||||
bts::overloaded{
|
||||
[&](const CreateOrderMsg &m) { me_->create_order(m); },
|
||||
[&](const CancelReplaceOrderMsg &m) { me_->update_order(m); },
|
||||
[&](const CancelOrderMsg &m) { me_->cancel_order(m); },
|
||||
[&](const CreateOrderMsg &m) { me->create_order(m); },
|
||||
[&](const CancelReplaceOrderMsg &m) { me->update_order(m); },
|
||||
[&](const CancelOrderMsg &m) { me->cancel_order(m); },
|
||||
[&](const RFQMsg &) {
|
||||
bts_assert_msg(
|
||||
false, "BinanceUsdsFutures RFQ not implemented");
|
||||
@@ -535,28 +535,28 @@ void UsdsFuturesGateway::send_fix(
|
||||
}
|
||||
|
||||
void UsdsFuturesGateway::dispatch_incoming_fix_messages() {
|
||||
me_->dispatch_internal_rejects();
|
||||
me_->dispatch_order_updates();
|
||||
me_->dispatch_account_updates();
|
||||
me->dispatch_internal_rejects();
|
||||
me->dispatch_order_updates();
|
||||
me->dispatch_account_updates();
|
||||
}
|
||||
|
||||
// Callbacks
|
||||
bts::orderman::OnExeReport &UsdsFuturesGateway::on_exe_report() {
|
||||
return me_->callbacks.exe_report;
|
||||
return me->callbacks.exe_report;
|
||||
}
|
||||
bts::orderman::OnGwStatusChange &UsdsFuturesGateway::on_gw_status_change() {
|
||||
return me_->callbacks.gw_status_change;
|
||||
return me->callbacks.gw_status_change;
|
||||
}
|
||||
bts::orderman::OnCancelReject &UsdsFuturesGateway::on_cancel_reject() {
|
||||
return me_->callbacks.cancel_reject;
|
||||
return me->callbacks.cancel_reject;
|
||||
}
|
||||
bts::orderman::OnExchangePositionState &
|
||||
UsdsFuturesGateway::on_exchange_position_state() {
|
||||
return me_->callbacks.exchange_position_state;
|
||||
return me->callbacks.exchange_position_state;
|
||||
}
|
||||
bts::orderman::OnExchangeOpenOrdersState &
|
||||
UsdsFuturesGateway::on_exchange_open_orders() {
|
||||
return me_->callbacks.exchange_open_orders;
|
||||
return me->callbacks.exchange_open_orders;
|
||||
}
|
||||
|
||||
} // namespace binance_execution::usds_futures
|
||||
@@ -41,7 +41,7 @@ class UsdsFuturesGateway : public bts::orderman::IExecutionGateway {
|
||||
|
||||
private:
|
||||
struct PImpl;
|
||||
std::unique_ptr<PImpl> me_;
|
||||
std::unique_ptr<PImpl> me;
|
||||
};
|
||||
|
||||
} // namespace binance_execution::usds_futures
|
||||
+6
-6
@@ -144,30 +144,30 @@ struct UserDataSubscription::PImpl {
|
||||
};
|
||||
|
||||
UserDataSubscription::UserDataSubscription(string url)
|
||||
: me_(std::make_unique<PImpl>(std::move(url))) {}
|
||||
: me(std::make_unique<PImpl>(std::move(url))) {}
|
||||
|
||||
UserDataSubscription::~UserDataSubscription() = default;
|
||||
|
||||
void UserDataSubscription::start() {
|
||||
INFO_FN("start");
|
||||
me_->start();
|
||||
me->start();
|
||||
}
|
||||
|
||||
bool UserDataSubscription::is_ready() const {
|
||||
return me_->ws_client && me_->ws_client->is_connected();
|
||||
return me->ws_client && me->ws_client->is_connected();
|
||||
}
|
||||
|
||||
void UserDataSubscription::stop() {
|
||||
INFO_FN("stop");
|
||||
me_->stop();
|
||||
me->stop();
|
||||
}
|
||||
|
||||
Delegate<void(AccountUpdate)> &UserDataSubscription::account_update_callback() {
|
||||
return me_->account_update_callback;
|
||||
return me->account_update_callback;
|
||||
}
|
||||
|
||||
Delegate<void(OrderUpdate)> &UserDataSubscription::order_update_callback() {
|
||||
return me_->order_update_callback;
|
||||
return me->order_update_callback;
|
||||
}
|
||||
|
||||
} // namespace binance_execution::usds_futures::user_data_stream
|
||||
+1
-1
@@ -25,7 +25,7 @@ class UserDataSubscription {
|
||||
|
||||
private:
|
||||
struct PImpl;
|
||||
std::unique_ptr<PImpl> me_;
|
||||
std::unique_ptr<PImpl> me;
|
||||
};
|
||||
|
||||
} // namespace binance_execution::usds_futures::user_data_stream
|
||||
Reference in new issue
Block a user