diff --git a/change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json b/change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json new file mode 100644 index 00000000000..280b4dba89e --- /dev/null +++ b/change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Test HttpServer build fix (#12001)", + "packageName": "react-native-windows", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/CoreApp.cpp b/vnext/Microsoft.ReactNative/CoreApp.cpp index 4f0329c4e02..1f4eb5b5e10 100644 --- a/vnext/Microsoft.ReactNative/CoreApp.cpp +++ b/vnext/Microsoft.ReactNative/CoreApp.cpp @@ -231,7 +231,7 @@ static void SetProperties(JsonObject const &json, RNCoreApp *app) { std::wstring nsName; std::wstring localName; if (lastDot != name.rend()) { - nsName = std::wstring{name.begin(), static_cast(name.rend() - lastDot - 1)}; + nsName = std::wstring{name.begin(), static_cast(name.rend() - lastDot - 1)}; localName = std::wstring{lastDot.base()}; } else { localName = name; diff --git a/vnext/Test/HttpServer.cpp b/vnext/Test/HttpServer.cpp index d6ca802d3cb..b08ccacf14b 100644 --- a/vnext/Test/HttpServer.cpp +++ b/vnext/Test/HttpServer.cpp @@ -283,8 +283,8 @@ void HttpSession::Close() #pragma region HttpServer -HttpServer::HttpServer(string &&address, uint16_t port, size_t concurrency) - : m_ioThreadCount{concurrency} +HttpServer::HttpServer(string &&address, uint16_t port, int concurrency) + : m_ioThreadCount{ static_cast(concurrency) } , m_ioContext{concurrency} , m_acceptor{make_strand(m_ioContext)} { @@ -319,7 +319,7 @@ HttpServer::HttpServer(string &&address, uint16_t port, size_t concurrency) } } -HttpServer::HttpServer(uint16_t port, size_t concurrency) +HttpServer::HttpServer(uint16_t port, int concurrency) : HttpServer("0.0.0.0", port, concurrency) { } diff --git a/vnext/Test/HttpServer.h b/vnext/Test/HttpServer.h index a3e25b2f9ad..6ba24c18082 100644 --- a/vnext/Test/HttpServer.h +++ b/vnext/Test/HttpServer.h @@ -126,8 +126,8 @@ class HttpServer : public std::enable_shared_from_this // address - Valid IP address string (i.e. "127.0.0.1). // port - TCP port number (i.e. 80). /// - HttpServer(std::string &&address, uint16_t port, size_t concurrency = 1); - HttpServer(uint16_t port, size_t concurrency = 1); + HttpServer(std::string &&address, uint16_t port, int concurrency = 1); + HttpServer(uint16_t port, int concurrency = 1); ~HttpServer();