🚨 fix warning
This commit is contained in:
parent
7b89d3ab29
commit
cc4d7f1697
@ -1213,11 +1213,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
|
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
|
||||||
basic_json(basic_json&& other) noexcept
|
basic_json(basic_json&& other) noexcept
|
||||||
: json_base_class_t(std::forward<json_base_class_t>(other)),
|
: json_base_class_t(std::forward<json_base_class_t>(other)),
|
||||||
m_data(std::move(other.m_data))
|
// check that passed value is valid (has to be done before moving)
|
||||||
|
m_data(std::move((other.assert_invariant(false), other.m_data)))
|
||||||
{
|
{
|
||||||
// check that passed value is valid
|
|
||||||
other.assert_invariant(false);
|
|
||||||
|
|
||||||
// invalidate payload
|
// invalidate payload
|
||||||
other.m_data.m_type = value_t::null;
|
other.m_data.m_type = value_t::null;
|
||||||
other.m_data.m_value = {};
|
other.m_data.m_value = {};
|
||||||
|
|||||||
@ -20516,11 +20516,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
|
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
|
||||||
basic_json(basic_json&& other) noexcept
|
basic_json(basic_json&& other) noexcept
|
||||||
: json_base_class_t(std::forward<json_base_class_t>(other)),
|
: json_base_class_t(std::forward<json_base_class_t>(other)),
|
||||||
m_data(std::move(other.m_data))
|
// check that passed value is valid (has to be done before moving)
|
||||||
|
m_data(std::move((other.assert_invariant(false), other.m_data)))
|
||||||
{
|
{
|
||||||
// check that passed value is valid
|
|
||||||
other.assert_invariant(false);
|
|
||||||
|
|
||||||
// invalidate payload
|
// invalidate payload
|
||||||
other.m_data.m_type = value_t::null;
|
other.m_data.m_type = value_t::null;
|
||||||
other.m_data.m_value = {};
|
other.m_data.m_value = {};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user