Browse Source

create addresses in defualt constructor

pull/574/head
orignal 8 years ago
parent
commit
3e5581e094
  1. 5
      RouterInfo.cpp
  2. 2
      RouterInfo.h

5
RouterInfo.cpp

@ -15,6 +15,11 @@ namespace i2p @@ -15,6 +15,11 @@ namespace i2p
{
namespace data
{
RouterInfo::RouterInfo (): m_Buffer (nullptr)
{
m_Addresses = std::make_shared<Addresses>(); // create empty list
}
RouterInfo::RouterInfo (const std::string& fullPath):
m_FullPath (fullPath), m_IsUpdated (false), m_IsUnreachable (false),
m_SupportedTransports (0), m_Caps (0)

2
RouterInfo.h

@ -107,8 +107,8 @@ namespace data @@ -107,8 +107,8 @@ namespace data
};
typedef std::vector<std::shared_ptr<Address> > Addresses;
RouterInfo ();
RouterInfo (const std::string& fullPath);
RouterInfo (): m_Buffer (nullptr) { };
RouterInfo (const RouterInfo& ) = default;
RouterInfo& operator=(const RouterInfo& ) = default;
RouterInfo (const uint8_t * buf, int len);

Loading…
Cancel
Save