Make SDK buildable in VS 2017 (#1078)

This commit is contained in:
Anton Kolesnyk 2020-12-03 19:16:18 -08:00 committed by GitHub
parent 8df6ecf9f9
commit 7d6d3dbf8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 4 deletions

View File

@ -23,6 +23,7 @@
#include <stdexcept>
#include <vector>
using Azure::Core::Context;
using namespace Azure::Core::Http;
// Keep reading until buffer is all fill out of the end of stream content is reached
@ -53,7 +54,7 @@ std::vector<uint8_t> BodyStream::ReadToEnd(Context const& context, BodyStream& b
for (auto chunkNumber = 0;; chunkNumber++)
{
buffer.resize((chunkNumber + 1) * chunkSize);
buffer.resize((static_cast<decltype(buffer)::size_type>(chunkNumber) + 1) * chunkSize);
int64_t readBytes
= ReadToCount(context, body, buffer.data() + (chunkNumber * chunkSize), chunkSize);

View File

@ -140,6 +140,7 @@ void WinSocketSetBuffSize(curl_socket_t socket)
#endif // WINDOWS
} // namespace
using Azure::Core::Context;
using Azure::Core::Http::CurlConnection;
using Azure::Core::Http::CurlConnectionPool;
using Azure::Core::Http::CurlNetworkConnection;
@ -1149,7 +1150,7 @@ std::unique_ptr<CurlNetworkConnection> CurlConnectionPool::GetCurlConnection(
// connection to be picked next time some one ask for a connection to the pool (LIFO)
void CurlConnectionPool::MoveConnectionBackToPool(
std::unique_ptr<CurlNetworkConnection> connection,
Http::HttpStatusCode lastStatusCode)
HttpStatusCode lastStatusCode)
{
auto code = static_cast<std::underlying_type<Http::HttpStatusCode>::type>(lastStatusCode);
// laststatusCode = 0

View File

@ -7,7 +7,7 @@
#include <chrono>
#include <sstream>
using namespace Azure::Core;
using Azure::Core::Context;
using namespace Azure::Core::Http;
namespace {

View File

@ -4,6 +4,7 @@
#include "azure/core/http/policy.hpp"
#include "azure/core/http/http.hpp"
using Azure::Core::Context;
using namespace Azure::Core::Http;
#ifndef _MSC_VER

View File

@ -10,7 +10,7 @@
#include <sstream>
#include <thread>
using namespace Azure::Core;
using Azure::Core::Context;
using namespace Azure::Core::Http;
namespace {

View File

@ -3,6 +3,7 @@
#include "azure/core/http/policy.hpp"
#include <cctype>
#include <sstream>
#ifdef _WIN32
@ -109,6 +110,7 @@ std::string TrimString(std::string s)
}
} // namespace
using Azure::Core::Context;
using namespace Azure::Core::Http;
std::string TelemetryPolicy::BuildTelemetryId(

View File

@ -3,6 +3,7 @@
#include "azure/core/http/policy.hpp"
using Azure::Core::Context;
using namespace Azure::Core::Http;
std::unique_ptr<RawResponse> TransportPolicy::Send(