Skip to content

Commit 1cc2f93

Browse files
committed
Removing some unnecssary MSC_VER macros as VS2012 is no longer supported.
1 parent ca10b01 commit 1cc2f93

File tree

5 files changed

+8
-24
lines changed

5 files changed

+8
-24
lines changed

Release/include/cpprest/details/http_client_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void http_client::build_pipeline(const uri &base_uri, const http_client_config &
442442
m_pipeline = ::web::http::http_pipeline::create_pipeline(std::make_shared<details::http_network_handler>(base_uri, client_config));
443443
}
444444

445-
#if !defined(CPPREST_TARGET_XP) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP || _MSC_VER > 1700)
445+
#if !defined(CPPREST_TARGET_XP)
446446
add_handler(std::static_pointer_cast<http::http_pipeline_stage>(
447447
std::make_shared<oauth1::details::oauth1_handler>(client_config.oauth1())));
448448
#endif

Release/include/cpprest/details/web_utilities.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ typedef std::unique_ptr<::utility::string_t, zero_memory_deleter> plaintext_stri
4848

4949
#if defined(_WIN32) && !defined(CPPREST_TARGET_XP)
5050
#if defined(__cplusplus_winrt)
51-
#if !(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP && _MSC_VER < 1800)
5251
class winrt_encryption
5352
{
5453
public:
@@ -58,7 +57,6 @@ class winrt_encryption
5857
private:
5958
::pplx::task<Windows::Storage::Streams::IBuffer ^> m_buffer;
6059
};
61-
#endif
6260
#else
6361
class win32_encryption
6462
{
@@ -111,11 +109,7 @@ class credentials
111109
utility::string_t password() const
112110
{
113111
#if defined(_WIN32) && !defined(CPPREST_TARGET_XP)
114-
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP && _MSC_VER < 1800
115-
return m_password;
116-
#else
117112
return utility::string_t(*m_password.decrypt());
118-
#endif
119113
#else
120114
return m_password;
121115
#endif
@@ -135,13 +129,9 @@ class credentials
135129

136130
details::plaintext_string decrypt() const
137131
{
138-
// Encryption APIs not supported on Windows Phone 8.0 or XP
132+
// Encryption APIs not supported on XP
139133
#if defined(_WIN32) && !defined(CPPREST_TARGET_XP)
140-
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP && _MSC_VER < 1800
141-
return details::plaintext_string(new ::utility::string_t(m_password));
142-
#else
143134
return m_password.decrypt();
144-
#endif
145135
#else
146136
return details::plaintext_string(new ::utility::string_t(m_password));
147137
#endif
@@ -151,11 +141,7 @@ class credentials
151141

152142
#if defined(_WIN32) && !defined(CPPREST_TARGET_XP)
153143
#if defined(__cplusplus_winrt)
154-
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP && _MSC_VER < 1800
155-
::utility::string_t m_password;
156-
#else
157144
details::winrt_encryption m_password;
158-
#endif
159145
#else
160146
details::win32_encryption m_password;
161147
#endif

Release/include/cpprest/http_client.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ typedef void* native_handle;}}}
5151
#include "cpprest/details/basic_types.h"
5252
#include "cpprest/asyncrt_utils.h"
5353

54-
#if !defined(CPPREST_TARGET_XP) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP || _MSC_VER > 1700)
54+
#if !defined(CPPREST_TARGET_XP)
5555
#include "cpprest/oauth1.h"
5656
#endif
5757

@@ -94,7 +94,7 @@ class http_client_config
9494
{
9595
}
9696

97-
#if !defined(CPPREST_TARGET_XP) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP || _MSC_VER > 1700)
97+
#if !defined(CPPREST_TARGET_XP)
9898
/// <summary>
9999
/// Get OAuth 1.0 configuration.
100100
/// </summary>
@@ -307,7 +307,7 @@ class http_client_config
307307
}
308308

309309
private:
310-
#if !defined(CPPREST_TARGET_XP) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP || _MSC_VER > 1700)
310+
#if !defined(CPPREST_TARGET_XP)
311311
std::shared_ptr<oauth1::experimental::oauth1_config> m_oauth1;
312312
#endif
313313

Release/src/http/oauth/oauth1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include "stdafx.h"
2727

28-
#if !defined(CPPREST_TARGET_XP) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP || _MSC_VER > 1700)
28+
#if !defined(CPPREST_TARGET_XP)
2929

3030
using namespace utility;
3131
using web::http::client::http_client;

Release/src/utilities/web_utilities.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ namespace details
4040
#if defined(_WIN32) && !defined(CPPREST_TARGET_XP)
4141
#if defined(__cplusplus_winrt)
4242

43-
// Not available on Windows Phone 8.0
44-
#if !(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP && _MSC_VER < 1800)
45-
4643
// Helper function to zero out memory of an IBuffer.
4744
void winrt_secure_zero_buffer(Windows::Storage::Streams::IBuffer ^buffer)
4845
{
@@ -101,8 +98,9 @@ plaintext_string winrt_encryption::decrypt() const
10198
SecureZeroMemory(rawPlaintext, plaintext->Length);
10299
return std::move(data);
103100
}
104-
#endif
101+
105102
#else
103+
106104
win32_encryption::win32_encryption(const std::wstring &data) :
107105
m_numCharacters(data.size())
108106
{

0 commit comments

Comments
 (0)