mirror of
https://github.com/nlohmann/json.git
synced 2026-10-11 17:07:15 +00:00
🚨 fix warning
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -1212,9 +1212,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
/// @brief move constructor
|
/// @brief move constructor
|
||||||
/// @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)),
|
// check that passed value is valid (has to be done before forwarding)
|
||||||
// check that passed value is valid (has to be done before moving)
|
: json_base_class_t((other.assert_invariant(false), std::forward<json_base_class_t>(other))),
|
||||||
m_data(std::move((other.assert_invariant(false), other.m_data)))
|
m_data(std::move(other.m_data))
|
||||||
{
|
{
|
||||||
// invalidate payload
|
// invalidate payload
|
||||||
other.m_data.m_type = value_t::null;
|
other.m_data.m_type = value_t::null;
|
||||||
|
|||||||
@@ -20515,9 +20515,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
/// @brief move constructor
|
/// @brief move constructor
|
||||||
/// @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)),
|
// check that passed value is valid (has to be done before forwarding)
|
||||||
// check that passed value is valid (has to be done before moving)
|
: json_base_class_t((other.assert_invariant(false), std::forward<json_base_class_t>(other))),
|
||||||
m_data(std::move((other.assert_invariant(false), other.m_data)))
|
m_data(std::move(other.m_data))
|
||||||
{
|
{
|
||||||
// invalidate payload
|
// invalidate payload
|
||||||
other.m_data.m_type = value_t::null;
|
other.m_data.m_type = value_t::null;
|
||||||
|
|||||||
Reference in new issue
Block a user