File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
include/aws/core/utils/cbor Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ namespace Aws
4343 * Moves the ownership of the CborValue.
4444 * No copying is performed.
4545 */
46- CborValue (CborValue&& value);
46+ CborValue (CborValue&& value) noexcept ;
4747
4848 /* *
4949 * Move assignment operator.
5050 */
51- CborValue& operator =(CborValue&& other);
51+ CborValue& operator =(CborValue&& other) noexcept ;
5252
5353 ~CborValue ();
5454
Original file line number Diff line number Diff line change @@ -39,20 +39,20 @@ CborValue& CborValue::operator=(const CborValue& other)
3939}
4040
4141CborValue::CborValue (CborValue&& value) :
42- m_body(std::move(value.m_body)),
43- m_decoder(std::move(value.m_decoder))
42+ m_body(std::move(value.m_body))
4443{
44+ auto cursor = Aws::Crt::ByteCursorFromArray (reinterpret_cast <const uint8_t *>(m_body.c_str ()), m_body.length ());
45+ m_decoder = std::make_shared<CborDecoder>(cursor);
4546}
4647
4748CborValue& CborValue::operator =(CborValue&& other)
4849{
4950 if (this != &other) {
5051 m_body = std::move (other.m_body );
51- m_decoder = std::move (other.m_decoder );
52+ auto cursor = Aws::Crt::ByteCursorFromArray (reinterpret_cast <const uint8_t *>(m_body.c_str ()), m_body.length ());
53+ m_decoder = std::make_shared<CborDecoder>(cursor);
5254 }
5355 return *this ;
5456}
5557
56- CborValue::~CborValue ()
57- {
58- }
58+ CborValue::~CborValue () = default ;
You can’t perform that action at this time.
0 commit comments