diff --git a/wpinet/src/main/native/windows/MulticastServiceResolver.cpp b/wpinet/src/main/native/windows/MulticastServiceResolver.cpp index c8a3d793e13..964c70ced6f 100644 --- a/wpinet/src/main/native/windows/MulticastServiceResolver.cpp +++ b/wpinet/src/main/native/windows/MulticastServiceResolver.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -49,10 +50,8 @@ MulticastServiceResolver::MulticastServiceResolver( if (wpi::ends_with_lower(serviceType, ".local")) { wpi::sys::windows::UTF8ToUTF16(serviceType, wideStorage); } else { - wpi::SmallString<128> storage; - storage.append(serviceType); - storage.append(".local"); - wpi::sys::windows::UTF8ToUTF16(storage.str(), wideStorage); + wpi::sys::windows::UTF8ToUTF16(fmt::format("{}.local", serviceType), + wideStorage); } pImpl->serviceType = std::wstring{wideStorage.data(), wideStorage.size()}; } @@ -71,10 +70,10 @@ static _Function_class_(DNS_QUERY_COMPLETION_ROUTINE) VOID WINAPI MulticastServiceResolver::Impl* impl = reinterpret_cast(pQueryContext); - wpi::SmallVector PtrRecords; - wpi::SmallVector SrvRecords; - wpi::SmallVector TxtRecords; - wpi::SmallVector ARecords; + std::vector PtrRecords; + std::vector SrvRecords; + std::vector TxtRecords; + std::vector ARecords; { DNS_RECORDW* current = pQueryResults->pQueryRecords;