AK: Remove uneeded null StringView handling for IP string parsing
A null StringView can be handled in the same way as an empty StringView, so we can remove these conditionals.
This commit is contained in:
parent
26cf55dc77
commit
08a9646f46
2 changed files with 0 additions and 6 deletions
|
|
@ -79,9 +79,6 @@ public:
|
|||
|
||||
static Optional<IPv4Address> from_string(StringView string)
|
||||
{
|
||||
if (string.is_null())
|
||||
return {};
|
||||
|
||||
auto const parts = string.split_view('.');
|
||||
|
||||
u32 a {};
|
||||
|
|
|
|||
|
|
@ -119,9 +119,6 @@ public:
|
|||
|
||||
static Optional<IPv6Address> from_string(StringView string)
|
||||
{
|
||||
if (string.is_null())
|
||||
return {};
|
||||
|
||||
// NOTE: This supports URI syntax (square brackets) for IPv6 addresses.
|
||||
// See: https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2
|
||||
auto const starts_with_bracket = string.starts_with('[');
|
||||
|
|
|
|||
Loading…
Reference in a new issue