Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor code cleanups #6169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ namespace Azure { namespace Core { namespace Amqp { namespace _detail {
}}}} // namespace Azure::Core::Amqp::_detail

namespace Azure { namespace Core { namespace Amqp { namespace _detail {
using UniqueAmqpCbsHandle = UniqueHandle<CBS_INSTANCE_TAG>;

class ClaimsBasedSecurityImpl final : public _internal::ManagementClientEvents {

public:
Expand Down
9 changes: 0 additions & 9 deletions sdk/core/azure-core/src/base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include "azure/core/base64.hpp"

#include "azure/core/platform.hpp"

#include <string>
#include <vector>

Expand Down Expand Up @@ -336,15 +334,11 @@ std::string Base64Encode(uint8_t const* const data, size_t length)
{
int32_t result = Base64EncodeAndPadTwo(&data[sourceIndex]);
Base64WriteIntAsFourBytes(destination, result);
destination += 4;
sourceIndex += 1;
}
else if (sourceIndex + 2 == inputSize)
{
int32_t result = Base64EncodeAndPadOne(&data[sourceIndex]);
Base64WriteIntAsFourBytes(destination, result);
destination += 4;
sourceIndex += 2;
}

return encodedResult;
Expand Down Expand Up @@ -453,7 +447,6 @@ std::vector<uint8_t> Base64Decode(const std::string& text)
}

Base64WriteThreeLowOrderBytes(destinationPtr, i0);
destinationPtr += 3;
}
else if (i2 != EncodingPad)
{
Expand All @@ -469,7 +462,6 @@ std::vector<uint8_t> Base64Decode(const std::string& text)

destinationPtr[1] = static_cast<uint8_t>(i0 >> 8);
destinationPtr[0] = static_cast<uint8_t>(i0 >> 16);
destinationPtr += 2;
}
else
{
Expand All @@ -479,7 +471,6 @@ std::vector<uint8_t> Base64Decode(const std::string& text)
}

destinationPtr[0] = static_cast<uint8_t>(i0 >> 16);
destinationPtr += 1;
}

return destination;
Expand Down
1 change: 0 additions & 1 deletion sdk/core/azure-core/src/datetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "azure/core/datetime.hpp"

#include "azure/core/internal/strings.hpp"
#include "azure/core/platform.hpp"

#include <algorithm>
#include <ctime>
Expand Down
12 changes: 0 additions & 12 deletions sdk/core/azure-core/src/http/curl/curl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,9 @@
#endif
#endif

#include "azure/core/platform.hpp"

#if defined(AZ_PLATFORM_WINDOWS)
#if !defined(WIN32_LEAN_AND_MEAN)
#define WIN32_LEAN_AND_MEAN
#endif
#if !defined(NOMINMAX)
#define NOMINMAX
#endif
#endif

#include "azure/core/http/curl_transport.hpp"
#include "azure/core/http/http.hpp"
#include "azure/core/http/policies/policy.hpp"
#include "azure/core/http/transport.hpp"
#include "azure/core/internal/diagnostics/log.hpp"
#include "azure/core/internal/strings.hpp"

Expand Down
2 changes: 0 additions & 2 deletions sdk/core/azure-core/src/http/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@

#include "azure/core/http/http.hpp"

#include "azure/core/http/policies/policy.hpp"
#include "azure/core/internal/strings.hpp"
#include "azure/core/url.hpp"

#include <algorithm>
#include <unordered_set>
#include <utility>

using namespace Azure::Core;
using namespace Azure::Core::Http;
Expand Down
3 changes: 0 additions & 3 deletions sdk/core/azure-core/src/http/log_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
#include "azure/core/http/policies/policy.hpp"
#include "azure/core/internal/diagnostics/log.hpp"

#include <algorithm>
#include <chrono>
#include <iterator>
#include <sstream>
#include <type_traits>

using Azure::Core::Context;
using namespace Azure::Core;
Expand Down