Refactor IPAddr v4 initialization from string. (fixes #775)

Revived code from old dotted_to_addr function to parse the
dotted address string directly instead of canonicalizing and
passing to inet_pton.
This commit is contained in:
Jon Siwek 2012-02-22 15:44:05 -06:00
parent d887eb3178
commit c84394d07f
2 changed files with 11 additions and 44 deletions

View file

@ -261,14 +261,6 @@ public:
unsigned int MemoryAllocation() const { return padded_sizeof(*this); }
/**
* Returns a canonicalized IPv4 dotted-decimal string such that
* leading zeroes of each decimal part are removed.
*
* @param s String containing an IPv4 address in dotted-decimal notation.
*/
static std::string CanonIPv4(const std::string& s);
private:
/**
* Initializes an address instance from a string representation.