Skip to content

Commit fc161fb

Browse files
committed
formatting
1 parent 65a8fd5 commit fc161fb

19 files changed

+56
-63
lines changed

src/app/configuration.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
#pragma once
77

8+
#include <filesystem>
89
#include <string>
910

10-
#include <filesystem>
1111
#include <boost/asio/ip/tcp.hpp>
1212
#include <utils/ctor_limiters.hpp>
1313

src/app/impl/application_impl.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
#pragma once
88

9-
#include "app/application.hpp"
10-
119
#include <memory>
1210

11+
#include <metrics/registry.hpp>
1312
#include <qtils/strict_sptr.hpp>
1413

15-
#include <metrics/registry.hpp>
14+
#include "app/application.hpp"
1615

1716
namespace jam {
1817
class Watchdog;

src/app/impl/state_manager_impl.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66

77
#pragma once
88

9-
#include "app/state_manager.hpp"
10-
119
#include <condition_variable>
1210
#include <mutex>
1311
#include <queue>
1412

1513
#include <qtils/strict_sptr.hpp>
1614

15+
#include "app/state_manager.hpp"
1716
#include "utils/ctor_limiters.hpp"
1817

1918
namespace soralog {

src/executable/jam_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace {
4343
std::shared_ptr<Configuration> appcfg) {
4444
auto injector = std::make_unique<NodeInjector>(logsys, appcfg);
4545
qtils::FinalAction dispose_se_on_exit(
46-
[se_manager{injector->getSE()}] { se_manager->dispose(); });
46+
[se_manager{injector->getSE()}] { se_manager->dispose(); });
4747

4848
// Load modules
4949
{

src/injector/node_injector.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,15 @@ namespace jam::injector {
9595
NodeInjector::NodeInjector(std::shared_ptr<log::LoggingSystem> logsys,
9696
std::shared_ptr<app::Configuration> config)
9797
: pimpl_{std::make_unique<NodeInjectorImpl>(
98-
makeNodeInjector(std::move(logsys), std::move(config)))} {}
98+
makeNodeInjector(std::move(logsys), std::move(config)))} {}
9999

100100
std::shared_ptr<app::Application> NodeInjector::injectApplication() {
101101
return pimpl_->injector_
102102
.template create<std::shared_ptr<app::Application>>();
103103
}
104104

105105
std::shared_ptr<Subscription> NodeInjector::getSE() {
106-
return pimpl_->injector_
107-
.template create<std::shared_ptr<Subscription>>();
106+
return pimpl_->injector_.template create<std::shared_ptr<Subscription>>();
108107
}
109108

110109
} // namespace jam::injector

src/injector/node_injector.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#pragma once
88

99
#include <memory>
10+
1011
#include "se/subscription.hpp"
1112

1213
namespace jam::log {

src/loaders/impl/example_loader.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace jam::loaders {
2121
: public std::enable_shared_from_this<ExampleLoader>,
2222
public Loader,
2323
public modules::ExampleModuleLoader {
24-
struct __T{};
24+
struct __T {};
2525
std::shared_ptr<log::LoggingSystem> logsys_;
2626

2727
using InitCompleteSubscriber = BaseSubscriber<__T>;
@@ -50,15 +50,15 @@ namespace jam::loaders {
5050
auto module_internal = (*function)(shared_from_this(), logsys_);
5151
on_init_complete_ = se::SubscriberCreator<__T>::template create<
5252
EventTypes::kOnTestOperationComplete>(
53-
*se_manager,
54-
SubscriptionEngineHandlers::kTest, [module_internal](auto &) {
53+
*se_manager,
54+
SubscriptionEngineHandlers::kTest,
55+
[module_internal](auto &) {
5556
if (auto m = module_internal.lock()) {
5657
m->on_loaded_success();
5758
}
5859
});
5960

60-
se_manager->notify(
61-
jam::EventTypes::kOnTestOperationComplete);
61+
se_manager->notify(jam::EventTypes::kOnTestOperationComplete);
6262
}
6363
}
6464
};

src/modules/module.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace jam::modules {
2222
// Static method for Module object creation
2323
static std::shared_ptr<Module> create(
2424
const std::string &path,
25-
std::unique_ptr<void, int(*)(void*)> handle,
25+
std::unique_ptr<void, int (*)(void *)> handle,
2626
const std::string &loader_id) {
2727
return std::shared_ptr<Module>(
2828
new Module(path, std::move(handle), loader_id));
@@ -51,13 +51,13 @@ namespace jam::modules {
5151

5252
private:
5353
Module(const std::string &path,
54-
std::unique_ptr<void, int(*)(void*)> handle,
54+
std::unique_ptr<void, int (*)(void *)> handle,
5555
const std::string &loader_id)
5656
: path_(path), handle_(std::move(handle)), loader_id_(loader_id) {}
5757

58-
std::string path_; // Library path
59-
std::unique_ptr<void, int(*)(void*)> handle_; // Library handle
60-
std::string loader_id_; // Loader ID
58+
std::string path_; // Library path
59+
std::unique_ptr<void, int (*)(void *)> handle_; // Library handle
60+
std::string loader_id_; // Loader ID
6161

6262
Module(const Module &) = delete;
6363
Module &operator=(const Module &) = delete;

src/modules/module_loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace jam::modules {
5252
Result<void> ModuleLoader::load_module(
5353
const std::string &module_path,
5454
std::deque<std::shared_ptr<Module>> &modules) {
55-
std::unique_ptr<void, int(*)(void*)> handle(
55+
std::unique_ptr<void, int (*)(void *)> handle(
5656
dlopen(module_path.c_str(), RTLD_LAZY), dlclose);
5757
if (!handle) {
5858
return Error::OpenLibraryFailed;

src/se/impl/async_dispatcher_impl.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ namespace jam::se {
1616
class AsyncDispatcher final : public IDispatcher {
1717
public:
1818
// Disable copying
19-
AsyncDispatcher(const AsyncDispatcher&) = delete;
20-
AsyncDispatcher& operator=(const AsyncDispatcher&) = delete;
21-
19+
AsyncDispatcher(const AsyncDispatcher &) = delete;
20+
AsyncDispatcher &operator=(const AsyncDispatcher &) = delete;
21+
2222
// Disable moving
23-
AsyncDispatcher(AsyncDispatcher&&) = delete;
24-
AsyncDispatcher& operator=(AsyncDispatcher&&) = delete;
23+
AsyncDispatcher(AsyncDispatcher &&) = delete;
24+
AsyncDispatcher &operator=(AsyncDispatcher &&) = delete;
2525

2626
static constexpr uint32_t kHandlersCount = kCount;
2727
static constexpr uint32_t kPoolThreadsCount = kPoolSize;

src/se/impl/dispatcher.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#pragma once
88

9-
#include <optional>
109
#include <memory>
10+
#include <optional>
1111

1212
#include "scheduler.hpp"
1313

src/se/impl/scheduler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
#pragma once
88

9+
#include <chrono>
910
#include <functional>
1011
#include <optional>
11-
#include <chrono>
1212

1313
namespace jam::se {
1414

src/se/impl/scheduler_impl.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ namespace jam::se {
119119

120120
public:
121121
// Disable copying
122-
SchedulerBase(const SchedulerBase&) = delete;
123-
SchedulerBase& operator=(const SchedulerBase&) = delete;
124-
125-
// Disable moving
126-
SchedulerBase(SchedulerBase&&) = delete;
127-
SchedulerBase& operator=(SchedulerBase&&) = delete;
122+
SchedulerBase(const SchedulerBase &) = delete;
123+
SchedulerBase &operator=(const SchedulerBase &) = delete;
124+
125+
// Disable moving
126+
SchedulerBase(SchedulerBase &&) = delete;
127+
SchedulerBase &operator=(SchedulerBase &&) = delete;
128128

129129
SchedulerBase() : is_busy_(false) {
130130
proceed_.test_and_set();

src/se/impl/subscriber.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ namespace jam::se {
2626
public:
2727
// Default constructor
2828
Subscriber() = default;
29-
29+
3030
// Disable copying
31-
Subscriber(const Subscriber&) = delete;
32-
Subscriber& operator=(const Subscriber&) = delete;
33-
31+
Subscriber(const Subscriber &) = delete;
32+
Subscriber &operator=(const Subscriber &) = delete;
33+
3434
// Disable moving
35-
Subscriber(Subscriber&&) = delete;
36-
Subscriber& operator=(Subscriber&&) = delete;
35+
Subscriber(Subscriber &&) = delete;
36+
Subscriber &operator=(Subscriber &&) = delete;
3737

3838
using EventType = EventKey;
3939
virtual ~Subscriber() = default;

src/se/impl/subscription_engine.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ namespace jam::se {
3535
SubscriptionEngine<EventKey, Dispatcher, Receiver>> {
3636
public:
3737
// Disable copying
38-
SubscriptionEngine(const SubscriptionEngine&) = delete;
39-
SubscriptionEngine& operator=(const SubscriptionEngine&) = delete;
40-
38+
SubscriptionEngine(const SubscriptionEngine &) = delete;
39+
SubscriptionEngine &operator=(const SubscriptionEngine &) = delete;
40+
4141
// Disable moving
42-
SubscriptionEngine(SubscriptionEngine&&) = delete;
43-
SubscriptionEngine& operator=(SubscriptionEngine&&) = delete;
42+
SubscriptionEngine(SubscriptionEngine &&) = delete;
43+
SubscriptionEngine &operator=(SubscriptionEngine &&) = delete;
4444

4545
using EventKeyType = EventKey;
4646
using ReceiverType = Receiver;

src/se/impl/subscription_manager.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ namespace jam::se {
3131
SubscriptionManager<kHandlersCount, kPoolSize>> {
3232
public:
3333
// Disable copying
34-
SubscriptionManager(const SubscriptionManager&) = delete;
35-
SubscriptionManager& operator=(const SubscriptionManager&) = delete;
36-
34+
SubscriptionManager(const SubscriptionManager &) = delete;
35+
SubscriptionManager &operator=(const SubscriptionManager &) = delete;
36+
3737
// Disable moving
38-
SubscriptionManager(SubscriptionManager&&) = delete;
39-
SubscriptionManager& operator=(SubscriptionManager&&) = delete;
38+
SubscriptionManager(SubscriptionManager &&) = delete;
39+
SubscriptionManager &operator=(SubscriptionManager &&) = delete;
4040

4141
using Dispatcher = jam::se::IDispatcher;
4242

src/se/impl/sync_dispatcher_impl.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ namespace jam::se {
1818

1919
public:
2020
// Disable copying
21-
SyncDispatcher(const SyncDispatcher&) = delete;
22-
SyncDispatcher& operator=(const SyncDispatcher&) = delete;
23-
21+
SyncDispatcher(const SyncDispatcher &) = delete;
22+
SyncDispatcher &operator=(const SyncDispatcher &) = delete;
23+
2424
// Disable moving
25-
SyncDispatcher(SyncDispatcher&&) = delete;
26-
SyncDispatcher& operator=(SyncDispatcher&&) = delete;
25+
SyncDispatcher(SyncDispatcher &&) = delete;
26+
SyncDispatcher &operator=(SyncDispatcher &&) = delete;
2727

2828
static constexpr uint32_t kHandlersCount = kCount;
2929

src/se/subscription.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@
88

99
#include <mutex>
1010

11-
namespace jam::se {
12-
13-
14-
15-
} // namespace jam::se
11+
namespace jam::se {} // namespace jam::se

src/se/subscription.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ namespace jam::se {
1919
template <typename ObjectType, typename... EventData>
2020
struct SubscriberCreator {
2121
template <EventTypes key, typename F, typename... Args>
22-
static auto create(
23-
Subscription &se,
24-
SubscriptionEngineHandlers tid,
22+
static auto create(Subscription &se,
23+
SubscriptionEngineHandlers tid,
2524
F &&callback,
2625
Args &&...args) {
2726
auto subscriber = BaseSubscriber<ObjectType, EventData...>::create(

0 commit comments

Comments
 (0)