Skip to content

Commit 2df5fa6

Browse files
committed
Use inline.
1 parent 8fc93bc commit 2df5fa6

File tree

10 files changed

+23
-21
lines changed

10 files changed

+23
-21
lines changed

include/bitcoin/node/protocols/protocol_bitcoind.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class BCN_API protocol_bitcoind
3434
public:
3535
typedef std::shared_ptr<protocol_bitcoind> ptr;
3636

37-
protocol_bitcoind(const auto& session,
37+
inline protocol_bitcoind(const auto& session,
3838
const network::channel::ptr& channel,
3939
const options_t& options) NOEXCEPT
4040
: node::protocol_http(session, channel, options),
@@ -43,7 +43,7 @@ class BCN_API protocol_bitcoind
4343
}
4444

4545
/// Public start is required.
46-
void start() NOEXCEPT override
46+
inline void start() NOEXCEPT override
4747
{
4848
node::protocol_http::start();
4949
}

include/bitcoin/node/protocols/protocol_electrum.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class BCN_API protocol_electrum
3434
public:
3535
typedef std::shared_ptr<protocol_electrum> ptr;
3636

37-
protocol_electrum(const auto& session,
37+
inline protocol_electrum(const auto& session,
3838
const network::channel::ptr& channel,
3939
const options_t& options) NOEXCEPT
4040
: node::protocol_tcp(session, channel, options),
@@ -43,7 +43,7 @@ class BCN_API protocol_electrum
4343
}
4444

4545
/// Public start is required.
46-
void start() NOEXCEPT override
46+
inline void start() NOEXCEPT override
4747
{
4848
node::protocol_tcp::start();
4949
}

include/bitcoin/node/protocols/protocol_explore.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BCN_API protocol_explore
3838
using interface = interface::explore;
3939
using dispatcher = network::rpc::dispatcher<interface>;
4040

41-
protocol_explore(const auto& session,
41+
inline protocol_explore(const auto& session,
4242
const network::channel::ptr& channel,
4343
const options_t& options) NOEXCEPT
4444
: node::protocol_html(session, channel, options),

include/bitcoin/node/protocols/protocol_html.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,22 @@ namespace node {
3030
/// Abstract base for HTML protocols, thread safe.
3131
class BCN_API protocol_html
3232
: public node::protocol,
33-
public network::protocol_http
33+
public network::protocol_http,
34+
protected network::tracker<protocol_html>
3435
{
3536
public:
3637
/// http channel, but html settings.
3738
using options_t = server::settings::html_server;
3839
using channel_t = node::channel_http;
3940

4041
protected:
41-
protocol_html(const auto& session,
42+
inline protocol_html(const auto& session,
4243
const network::channel::ptr& channel,
4344
const options_t& options) NOEXCEPT
4445
: node::protocol(session, channel),
4546
network::protocol_http(session, channel, options),
46-
options_(options)
47+
options_(options),
48+
network::tracker<protocol_html>(session->log)
4749
{
4850
}
4951

include/bitcoin/node/protocols/protocol_http.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BCN_API protocol_http
4040
using channel_t = node::channel_http;
4141

4242
protected:
43-
protocol_http(const auto& session,
43+
inline protocol_http(const auto& session,
4444
const network::channel::ptr& channel,
4545
const options_t& options) NOEXCEPT
4646
: node::protocol(session, channel),

include/bitcoin/node/protocols/protocol_peer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class BCN_API protocol_peer
4444
/// -----------------------------------------------------------------------
4545
/// static_pointer_cast relies on create_channel().
4646

47-
protocol_peer(const auto& session,
47+
inline protocol_peer(const auto& session,
4848
const network::channel::ptr& channel) NOEXCEPT
4949
: node::protocol(session, channel),
5050
network::protocol_peer(session, channel),

include/bitcoin/node/protocols/protocol_tcp.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BCN_API protocol_tcp
4040
using channel_t = node::channel_tcp;
4141

4242
protected:
43-
protocol_tcp(const auto& session,
43+
inline protocol_tcp(const auto& session,
4444
const network::channel::ptr& channel, const options_t&) NOEXCEPT
4545
: node::protocol(session, channel),
4646
network::protocol(session, channel),

include/bitcoin/node/protocols/protocol_web.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class BCN_API protocol_web
3434
public:
3535
typedef std::shared_ptr<protocol_web> ptr;
3636

37-
protocol_web(const auto& session,
37+
inline protocol_web(const auto& session,
3838
const network::channel::ptr& channel,
3939
const options_t& options) NOEXCEPT
4040
: node::protocol_html(session, channel, options),
@@ -43,7 +43,7 @@ class BCN_API protocol_web
4343
}
4444

4545
/// Public start is required.
46-
void start() NOEXCEPT override
46+
inline void start() NOEXCEPT override
4747
{
4848
node::protocol_html::start();
4949
}

include/bitcoin/node/protocols/protocol_ws.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class BCN_API protocol_ws
3939
// Replace base class channel_t (network::channel_ws).
4040
using channel_t = node::channel_ws;
4141

42-
protocol_ws(const auto& session,
42+
inline protocol_ws(const auto& session,
4343
const network::channel::ptr& channel,
4444
const options_t& options) NOEXCEPT
4545
: node::protocol(session, channel),
@@ -49,7 +49,7 @@ class BCN_API protocol_ws
4949
}
5050

5151
/// Public start is required.
52-
void start() NOEXCEPT override
52+
inline void start() NOEXCEPT override
5353
{
5454
network::protocol_ws::start();
5555
}

include/bitcoin/node/sessions/session_server.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class full_node;
3939
/// and attachment can be overridden and/or augmented with other protocols.
4040
template <typename Protocol>
4141
class session_server
42-
: public network::session_server,
43-
public node::session,
42+
: public node::session,
43+
public network::session_server,
4444
protected network::tracker<session_server<Protocol>>
4545
{
4646
public:
@@ -53,10 +53,10 @@ class session_server
5353
/// Construct an instance (network should be started).
5454
inline session_server(full_node& node, uint64_t identifier,
5555
const options_t& options) NOEXCEPT
56-
: network::session_server((network::net&)node, identifier, options),
57-
node::session(node),
58-
network::tracker<session_server<Protocol>>(node),
59-
options_(options)
56+
: node::session(node),
57+
network::session_server((network::net&)node, identifier, options),
58+
options_(options),
59+
network::tracker<session_server<Protocol>>(node)
6060
{
6161
}
6262

0 commit comments

Comments
 (0)