Skip to content

Commit ba245ec

Browse files
committed
Remove unneccessary copy constructor from web::json::details::_Object class.
1 parent f1d8946 commit ba245ec

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Release/include/cpprest/json.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,11 +1573,9 @@ namespace json
15731573
_Object(bool keep_order) : m_object(keep_order) { }
15741574
_Object(object::storage_type fields, bool keep_order) : m_object(std::move(fields), keep_order) { }
15751575

1576-
_ASYNCRTIMP _Object(const _Object& other);
1576+
virtual json::object& as_object() { return m_object; }
15771577

1578-
virtual json::object& as_object() { return m_object; }
1579-
1580-
virtual const json::object& as_object() const { return m_object; }
1578+
virtual const json::object& as_object() const { return m_object; }
15811579

15821580
virtual json::value::value_type type() const { return json::value::Object; }
15831581

@@ -1587,7 +1585,7 @@ namespace json
15871585

15881586
bool is_equal(const _Object* other) const
15891587
{
1590-
if ( m_object.size() != other->m_object.size())
1588+
if (m_object.size() != other->m_object.size())
15911589
return false;
15921590

15931591
return std::equal(std::begin(m_object), std::end(m_object), std::begin(other->m_object));

Release/src/json/json.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,6 @@ bool web::json::details::_String::has_escape_chars(const _String &str)
347347
return str.m_string.find_first_of(escapes.data(), 0, escapes.size()) != utility::string_t::npos;
348348
}
349349

350-
web::json::details::_Object::_Object(const _Object& other) :
351-
web::json::details::_Value(other), m_object(other.m_object.m_elements, other.m_object.m_keep_order) {}
352-
353350
web::json::value::value_type json::value::type() const { return m_value->type(); }
354351

355352
bool json::value::is_integer() const

0 commit comments

Comments
 (0)