mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Prevent accidental aggregates
* The compiler can provide many non-explicit constructors for aggregate types. This is sometimes desired, but it can happen accidentally, resulting in run-time errors. * This commit assures that no types are aggregates unless existing code is using aggregate initialization.
This commit is contained in:
committed by
Nikolaos D. Bougalis
parent
b7335fdff5
commit
db3b4dd396
@@ -46,11 +46,15 @@ class ServerHandlerImp
|
||||
public:
|
||||
struct Setup
|
||||
{
|
||||
explicit Setup() = default;
|
||||
|
||||
std::vector<Port> ports;
|
||||
|
||||
// Memberspace
|
||||
struct client_t
|
||||
{
|
||||
explicit client_t() = default;
|
||||
|
||||
bool secure = false;
|
||||
std::string ip;
|
||||
std::uint16_t port = 0;
|
||||
@@ -66,6 +70,8 @@ public:
|
||||
// Configuration for the Overlay
|
||||
struct overlay_t
|
||||
{
|
||||
explicit overlay_t() = default;
|
||||
|
||||
boost::asio::ip::address ip;
|
||||
std::uint16_t port = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user