Skip to content

Commit 5dffb49

Browse files
committed
fix all compile errors when apply clang tidy
1 parent 061b553 commit 5dffb49

File tree

47 files changed

+586
-566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+586
-566
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ set_target_properties(benchmark PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_FOR_3RD_
137137
set_target_properties(gtest_main PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_FOR_3RD_PARTY}")
138138
set_target_properties(gtest PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_FOR_3RD_PARTY}")
139139
set_target_properties(simdjson PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_FOR_3RD_PARTY}")
140+
set_target_properties(gmock_main PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_FOR_3RD_PARTY}")
141+
set_target_properties(gmock PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_FOR_3RD_PARTY}")
142+
140143

141144
# set(DOWNLOAD_DEPENDENCIES ON CACHE BOOL "Download dependencies for mlpack")
142145

aoe/binance/execution_event/i_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
2+
#include "aos/common/exchange_id.h"
23
#include "aos/common/ref_counted.h"
34
#include "aos/position_storage/position_storage_by_pair/i_position_storage_by_pair.h"
45
#include "aos/trading_pair/trading_pair.h"
5-
#include "aos/common/exchange_id.h"
66

77
namespace aoe {
88
namespace binance {
@@ -11,7 +11,7 @@ class ExecutionEventInterface
1111
: public common::RefCounted<
1212
MemoryPool, ExecutionEventInterface<MemoryPool, PositionT>> {
1313
public:
14-
virtual ~ExecutionEventInterface() = default;
14+
~ExecutionEventInterface() override = default;
1515
virtual double Fee() const { return fee_; }
1616
virtual double ExecPrice() const { return exec_price_; }
1717
virtual double ExecQty() const = 0;

aoe/binance/infrastructure/i_infrastructure.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class InfrastructureNotifierInterface
6363
: public InfrastructureNotifierOnBestBidChangeInterface<Price, Qty>,
6464
public InfrastructureNotifierOnBestAskChangeInterface<Price, Qty> {
6565
public:
66-
virtual ~InfrastructureNotifierInterface() = default;
66+
~InfrastructureNotifierInterface() override = default;
6767
};
6868
}; // namespace main_net
6969
}; // namespace spot

aoe/binance/leaves_qty_calculator/leaves_qty_calculator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ template <template <typename> typename MemoryPool>
88
class LeavesQtyCalculator : public LeavesQtyCalculatorInterface<MemoryPool> {
99
public:
1010
~LeavesQtyCalculator() override = default;
11-
double Calculate(const OrderEventInterface<MemoryPool>& event) const {
11+
double Calculate(
12+
const OrderEventInterface<MemoryPool>& event) const override {
1213
return event.OrderQty() - event.CumExecQty();
1314
};
1415
};

aoe/binance/order_event/i_order_event.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace binance {
1111
template <template <typename> typename MemoryPool>
1212
class OrderEventInterface : public aos::OrderEventInterface<MemoryPool> {
1313
public:
14-
virtual ~OrderEventInterface() = default;
14+
~OrderEventInterface() override = default;
1515
virtual void SetTradingPair(aos::TradingPair trading_pair) {
1616
trading_pair_ = trading_pair;
1717
};

aoe/binance/parser/json/ws/execution_response/execution_event_parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ExecutionEventParser
4040
RegisterFromConfig();
4141
}
4242
std::pair<bool, EventPtr> ParseAndCreate(
43-
simdjson::ondemand::document& doc) {
43+
simdjson::ondemand::document& doc) override {
4444
// Тип исполнения может быть NEW, TRADE, FILLED и т.д.
4545
auto exec_type = doc["x"];
4646
if (exec_type.error() != simdjson::SUCCESS ||
@@ -132,7 +132,7 @@ class ExecutionEventParser
132132
RegisterFromConfig();
133133
}
134134
std::pair<bool, EventPtr> ParseAndCreate(
135-
simdjson::ondemand::document& doc) {
135+
simdjson::ondemand::document& doc) override {
136136
// Тип исполнения может быть NEW, TRADE, FILLED и т.д.
137137
auto exec_type = doc["x"];
138138
if (exec_type.error() != simdjson::SUCCESS ||

aoe/bybit/api/i_exchange_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ class SingleOrderAPIInterface : public PlaceOrderInterface<MemoryPool>,
6666
public CancelOrderInterface<MemoryPool>,
6767
public CancelAllOrderInterface<MemoryPool> {
6868
public:
69-
virtual ~SingleOrderAPIInterface() = default;
69+
~SingleOrderAPIInterface() override = default;
7070
};
7171

7272
template <template <typename> typename MemoryPool>
7373
class BatchOrderAPIInterface : public PlaceBacthOrderInterface<MemoryPool>,
7474
public AmendBatchOrderInterface<MemoryPool>,
7575
public CancelBatchOrderInterface<MemoryPool> {
7676
public:
77-
virtual ~BatchOrderAPIInterface() = default;
77+
~BatchOrderAPIInterface() override = default;
7878
};
7979
}; // namespace bybit
8080
}; // namespace aoe

aoe/bybit/execution_event/i_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
2+
#include "aos/common/exchange_id.h"
23
#include "aos/common/ref_counted.h"
34
#include "aos/position_storage/position_storage_by_pair/i_position_storage_by_pair.h"
45
#include "aos/trading_pair/trading_pair.h"
5-
#include "aos/common/exchange_id.h"
66

77
namespace aoe {
88
namespace bybit {
@@ -11,7 +11,7 @@ class ExecutionEventInterface
1111
: public common::RefCounted<
1212
MemoryPool, ExecutionEventInterface<MemoryPool, PositionT>> {
1313
public:
14-
virtual ~ExecutionEventInterface() = default;
14+
~ExecutionEventInterface() override = default;
1515
virtual double Fee() const { return fee_; }
1616
virtual double ExecPrice() const { return exec_price_; }
1717
virtual double ExecQty() const = 0;

aoe/bybit/execution_watcher/execution_watcher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ExecutionWatcherDefault
6666
: position_storage_(position_storage) {};
6767
void OnEvent(
6868
boost::intrusive_ptr<ExecutionEventInterface<MemoryPool, PositionT>>
69-
event) {
69+
event) override {
7070
event->Accept(position_storage_);
7171
};
7272
~ExecutionWatcherDefault() = default;

aoe/bybit/infrastructure/i_infrastructure.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class InfrastructureNotifierInterface
6363
: public InfrastructureNotifierOnBestBidChangeInterface<Price, Qty>,
6464
public InfrastructureNotifierOnBestAskChangeInterface<Price, Qty> {
6565
public:
66-
virtual ~InfrastructureNotifierInterface() = default;
66+
~InfrastructureNotifierInterface() override = default;
6767
};
6868
}; // namespace main_net
6969
}; // namespace spot

0 commit comments

Comments
 (0)