@@ -1348,8 +1348,6 @@ namespace json
1348
1348
class _Value
1349
1349
{
1350
1350
public:
1351
- virtual std::unique_ptr<_Value> _copy_value () = 0;
1352
-
1353
1351
virtual bool has_field (const utility::string_t &) const { return false ; }
1354
1352
virtual value get_field (const utility::string_t &) const { throw json_exception (_XPLATSTR (" not an object" )); }
1355
1353
virtual value get_element (array::size_type) const { throw json_exception (_XPLATSTR (" not an array" )); }
@@ -1419,18 +1417,7 @@ namespace json
1419
1417
class _Null : public _Value
1420
1418
{
1421
1419
public:
1422
-
1423
- virtual std::unique_ptr<_Value> _copy_value ()
1424
- {
1425
- return utility::details::make_unique<_Null>();
1426
- }
1427
-
1428
1420
virtual json::value::value_type type () const { return json::value::Null; }
1429
-
1430
- _Null () { }
1431
-
1432
- private:
1433
- template <typename CharType> friend class json ::details::JSON_Parser;
1434
1421
};
1435
1422
1436
1423
class _Number : public _Value
@@ -1442,11 +1429,6 @@ namespace json
1442
1429
_Number (int64_t value) : m_number(value) { }
1443
1430
_Number (uint64_t value) : m_number(value) { }
1444
1431
1445
- virtual std::unique_ptr<_Value> _copy_value ()
1446
- {
1447
- return utility::details::make_unique<_Number>(*this );
1448
- }
1449
-
1450
1432
virtual json::value::value_type type () const { return json::value::Number; }
1451
1433
1452
1434
virtual bool is_integer () const { return m_number.is_integral (); }
@@ -1478,11 +1460,7 @@ namespace json
1478
1460
class _Boolean : public _Value
1479
1461
{
1480
1462
public:
1481
-
1482
- virtual std::unique_ptr<_Value> _copy_value ()
1483
- {
1484
- return utility::details::make_unique<_Boolean>(*this );
1485
- }
1463
+ _Boolean (bool value) : m_value(value) { }
1486
1464
1487
1465
virtual json::value::value_type type () const { return json::value::Boolean; }
1488
1466
@@ -1502,9 +1480,6 @@ namespace json
1502
1480
#endif
1503
1481
private:
1504
1482
template <typename CharType> friend class json ::details::JSON_Parser;
1505
- public:
1506
- _Boolean (bool value) : m_value(value) { }
1507
- private:
1508
1483
bool m_value;
1509
1484
};
1510
1485
@@ -1545,11 +1520,6 @@ namespace json
1545
1520
return *this ;
1546
1521
}
1547
1522
1548
- virtual std::unique_ptr<_Value> _copy_value ()
1549
- {
1550
- return utility::details::make_unique<_String>(*this );
1551
- }
1552
-
1553
1523
virtual json::value::value_type type () const { return json::value::String; }
1554
1524
1555
1525
virtual const utility::string_t & as_string () const ;
@@ -1627,11 +1597,6 @@ namespace json
1627
1597
1628
1598
virtual ~_Object () {}
1629
1599
1630
- virtual std::unique_ptr<_Value> _copy_value ()
1631
- {
1632
- return utility::details::make_unique<_Object>(*this );
1633
- }
1634
-
1635
1600
virtual json::object& as_object () { return m_object; }
1636
1601
1637
1602
virtual const json::object& as_object () const { return m_object; }
@@ -1740,11 +1705,6 @@ namespace json
1740
1705
_Array (array::size_type size) : m_array(size) {}
1741
1706
_Array (array::storage_type elements) : m_array(std::move(elements)) { }
1742
1707
1743
- virtual std::unique_ptr<_Value> _copy_value ()
1744
- {
1745
- return utility::details::make_unique<_Array>(*this );
1746
- }
1747
-
1748
1708
virtual json::value::value_type type () const { return json::value::Array; }
1749
1709
1750
1710
virtual json::array& as_array () { return m_array; }
0 commit comments