@@ -60,7 +60,7 @@ static const utility::string_t textual_types [] = {
60
60
#endif
61
61
bool is_content_type_textual (const utility::string_t &content_type)
62
62
{
63
- #if !defined(_WIN32) || _MSC_VER > 1900
63
+ #if !defined(_WIN32) || _MSC_VER >= 1900
64
64
static const utility::string_t textual_types [] = {
65
65
mime_types::message_http,
66
66
mime_types::application_json,
@@ -93,7 +93,7 @@ static const utility::string_t json_types [] = {
93
93
#endif
94
94
bool is_content_type_json (const utility::string_t &content_type)
95
95
{
96
- #if !defined(_WIN32) || _MSC_VER > 1900
96
+ #if !defined(_WIN32) || _MSC_VER >= 1900
97
97
static const utility::string_t json_types [] = {
98
98
mime_types::application_json,
99
99
mime_types::application_xjson,
@@ -173,7 +173,7 @@ utility::string_t get_default_charset(const utility::string_t &content_type)
173
173
174
174
// Remove once VS 2013 is no longer supported.
175
175
#if defined(_WIN32) && _MSC_VER < 1900
176
- static http_status_to_phrase idToPhraseMap [] = {
176
+ static const http_status_to_phrase idToPhraseMap [] = {
177
177
#define _PHRASES
178
178
#define DAT (a,b,c ) {status_codes::a, c},
179
179
#include " cpprest/details/http_constants.dat"
@@ -183,11 +183,11 @@ static http_status_to_phrase idToPhraseMap [] = {
183
183
#endif
184
184
utility::string_t get_default_reason_phrase (status_code code)
185
185
{
186
- #if !defined(_WIN32) || _MSC_VER > 1900
186
+ #if !defined(_WIN32) || _MSC_VER >= 1900
187
187
// Future improvement: why is this stored as an array of structs instead of a map
188
188
// indexed on the status code for faster lookup?
189
189
// Not a big deal because it is uncommon to not include a reason phrase.
190
- static http_status_to_phrase idToPhraseMap [] = {
190
+ static const http_status_to_phrase idToPhraseMap [] = {
191
191
#define _PHRASES
192
192
#define DAT (a,b,c ) {status_codes::a, c},
193
193
#include " cpprest/details/http_constants.dat"
@@ -197,11 +197,11 @@ utility::string_t get_default_reason_phrase(status_code code)
197
197
#endif
198
198
199
199
utility::string_t phrase;
200
- for (const auto &iter : idToPhraseMap)
200
+ for (const auto &elm : idToPhraseMap)
201
201
{
202
- if (iter .id == code)
202
+ if (elm .id == code)
203
203
{
204
- phrase = iter .phrase ;
204
+ phrase = elm .phrase ;
205
205
break ;
206
206
}
207
207
}
0 commit comments