Skip to content

Commit

Permalink
Make empty constructor as peer to explicit (#453)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored Nov 2, 2023
1 parent b012e82 commit 237831a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/gz/transport/Node.hh
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ namespace gz
#endif
};

public: Node();

/// \brief Constructor.
/// \param[in] _options Node options.
public: explicit Node(const NodeOptions &_options = NodeOptions());
public: explicit Node(const NodeOptions &_options);

/// \brief Destructor.
public: virtual ~Node();
Expand Down
6 changes: 6 additions & 0 deletions src/Node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,12 @@ Node::Node(const NodeOptions &_options)
this->dataPtr->options = _options;
}

//////////////////////////////////////////////////
Node::Node():
Node(gz::transport::NodeOptions())
{
}

//////////////////////////////////////////////////
Node::~Node()
{
Expand Down

0 comments on commit 237831a

Please sign in to comment.