File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -1389,8 +1389,6 @@ namespace web { namespace json
1389
1389
}
1390
1390
return reserveSize;
1391
1391
}
1392
-
1393
- template <typename CharType> friend class web ::json::details::JSON_Parser;
1394
1392
};
1395
1393
} // namespace details
1396
1394
Original file line number Diff line number Diff line change @@ -313,20 +313,24 @@ bool web::json::number::is_int64() const
313
313
}
314
314
}
315
315
316
+ struct has_escape_chars_impl {
317
+ static const char * escapes8;
318
+ static const wchar_t * escapes16;
319
+
320
+ static bool impl (const std::string& s) {
321
+ return s.find_first_of (escapes8) != std::string::npos;
322
+ }
323
+ static bool impl (const std::wstring& s) {
324
+ return s.find_first_of (escapes16) != std::wstring::npos;
325
+ }
326
+ };
327
+
328
+ const char * has_escape_chars_impl::escapes8 = " \"\\\b\f\r\n\t " ;
329
+ const wchar_t * has_escape_chars_impl::escapes16 = L" \"\\\b\f\r\n\t " ;
330
+
316
331
bool web::json::details::_String::has_escape_chars (const _String &str)
317
332
{
318
- struct escapes {
319
- static const char * escapes8 = " \"\\\b\f\r\n\t " ;
320
- static const wchar_t * escapes16 = L" \"\\\b\f\r\n\t " ;
321
-
322
- static bool impl (const std::string& s) {
323
- return s.find_first_of (escapes8) != std::string::npos;
324
- }
325
- static bool impl (const std::wstring& s) {
326
- return s.find_first_of (escapes16) != std::wstring::npos;
327
- }
328
- };
329
- return escapes::impl (str.m_string );
333
+ return has_escape_chars_impl::impl (str.m_string );
330
334
}
331
335
332
336
web::json::details::_Object::_Object (const _Object& other):web::json::details::_Value(other)
@@ -489,4 +493,4 @@ const web::json::value& web::json::value::operator[](size_t index) const
489
493
#endif
490
494
}
491
495
return m_value->cnst_index (index);
492
- }
496
+ }
Original file line number Diff line number Diff line change @@ -321,12 +321,14 @@ TEST(floating_number_serialize)
321
321
value.serialize (ss);
322
322
VERIFY_ARE_EQUAL (len, ss.str ().length ());
323
323
324
+ #ifdef _MS_WINDOWS
324
325
// Check wide string implementation
325
326
std::basic_stringstream<wchar_t > wss;
326
327
value.serialize (wss);
327
328
VERIFY_ARE_EQUAL (len, wss.str ().length ());
329
+ #endif
328
330
}
329
331
330
332
} // SUITE(to_as_and_operators_tests)
331
333
332
- }}}
334
+ }}}
You can’t perform that action at this time.
0 commit comments