AK: Add Kernel namespace to KStrings in AK::IPv6Address

Currently there is no AK::IPv6Address in the kernel. But when there is,
KStrings won't resolve properly because they are in Kernel namespace.
This commit is contained in:
Thitat Auareesuksakul 2022-04-15 16:20:33 +07:00 committed by Brian Gianforcaro
parent 3c00c1cfad
commit f4b8bae65f
Notes: sideshowbarker 2024-07-17 17:06:59 +09:00

View file

@ -56,7 +56,7 @@ public:
{
if (is_zero()) {
#ifdef KERNEL
return KString::try_create("::"sv);
return Kernel::KString::try_create("::"sv);
#else
return "::"sv;
#endif
@ -67,7 +67,7 @@ public:
if (is_ipv4_mapped()) {
#ifdef KERNEL
return KString::formatted("::ffff:{}.{}.{}.{}", m_data[12], m_data[13], m_data[14], m_data[15]);
return Kernel::KString::formatted("::ffff:{}.{}.{}.{}", m_data[12], m_data[13], m_data[14], m_data[15]);
#else
return String::formatted("::ffff:{}.{}.{}.{}", m_data[12], m_data[13], m_data[14], m_data[15]);
#endif
@ -114,7 +114,7 @@ public:
i++;
}
#ifdef KERNEL
return KString::try_create(builder.string_view());
return Kernel::KString::try_create(builder.string_view());
#else
return builder.string_view();
#endif