Skip to content

Commit f1d8946

Browse files
committed
Removing unnecessary copy constructor from web::json::details::_String class.
1 parent 67bc939 commit f1d8946

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

Release/include/cpprest/json.h

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,19 +1507,6 @@ namespace json
15071507
{ }
15081508
#endif
15091509

1510-
_String(const _String& other) : web::json::details::_Value(other)
1511-
{
1512-
copy_from(other);
1513-
}
1514-
1515-
_String& operator=(const _String& other)
1516-
{
1517-
if (this != &other) {
1518-
copy_from(other);
1519-
}
1520-
return *this;
1521-
}
1522-
15231510
virtual json::value::value_type type() const { return json::value::String; }
15241511

15251512
virtual const utility::string_t & as_string() const;
@@ -1559,12 +1546,6 @@ namespace json
15591546
format(str);
15601547
}
15611548

1562-
void copy_from(const _String& other)
1563-
{
1564-
m_string = other.m_string;
1565-
m_has_escape_char = other.m_has_escape_char;
1566-
}
1567-
15681549
std::string as_utf8_string() const;
15691550
utf16string as_utf16_string() const;
15701551

@@ -1590,13 +1571,10 @@ namespace json
15901571
public:
15911572

15921573
_Object(bool keep_order) : m_object(keep_order) { }
1593-
15941574
_Object(object::storage_type fields, bool keep_order) : m_object(std::move(fields), keep_order) { }
15951575

15961576
_ASYNCRTIMP _Object(const _Object& other);
15971577

1598-
virtual ~_Object() {}
1599-
16001578
virtual json::object& as_object() { return m_object; }
16011579

16021580
virtual const json::object& as_object() const { return m_object; }
@@ -1605,7 +1583,7 @@ namespace json
16051583

16061584
virtual bool has_field(const utility::string_t &) const;
16071585

1608-
_ASYNCRTIMP virtual json::value &index(const utility::string_t &key);
1586+
virtual json::value &index(const utility::string_t &key);
16091587

16101588
bool is_equal(const _Object* other) const
16111589
{
@@ -1648,8 +1626,6 @@ namespace json
16481626

16491627
template<typename CharType> friend class json::details::JSON_Parser;
16501628

1651-
_ASYNCRTIMP void map_fields();
1652-
16531629
template<typename CharType>
16541630
void format_impl(std::basic_string<CharType>& str) const
16551631
{

0 commit comments

Comments
 (0)