Ignores the cppcheck warnings about missing explicit keywords on constructor with one parameter in json_ref.hpp.
This commit is contained in:
parent
edef01a64f
commit
67b8c21a78
@ -15,14 +15,17 @@ class json_ref
|
|||||||
public:
|
public:
|
||||||
using value_type = BasicJsonType;
|
using value_type = BasicJsonType;
|
||||||
|
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(value_type&& value)
|
json_ref(value_type&& value)
|
||||||
: owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true)
|
: owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(const value_type& value)
|
json_ref(const value_type& value)
|
||||||
: value_ref(const_cast<value_type*>(&value)), is_rvalue(false)
|
: value_ref(const_cast<value_type*>(&value)), is_rvalue(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(std::initializer_list<json_ref> init)
|
json_ref(std::initializer_list<json_ref> init)
|
||||||
: owned_value(init), value_ref(&owned_value), is_rvalue(true)
|
: owned_value(init), value_ref(&owned_value), is_rvalue(true)
|
||||||
{}
|
{}
|
||||||
@ -30,6 +33,7 @@ class json_ref
|
|||||||
template <
|
template <
|
||||||
class... Args,
|
class... Args,
|
||||||
enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 >
|
enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 >
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(Args && ... args)
|
json_ref(Args && ... args)
|
||||||
: owned_value(std::forward<Args>(args)...), value_ref(&owned_value),
|
: owned_value(std::forward<Args>(args)...), value_ref(&owned_value),
|
||||||
is_rvalue(true) {}
|
is_rvalue(true) {}
|
||||||
|
|||||||
@ -11103,14 +11103,17 @@ class json_ref
|
|||||||
public:
|
public:
|
||||||
using value_type = BasicJsonType;
|
using value_type = BasicJsonType;
|
||||||
|
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(value_type&& value)
|
json_ref(value_type&& value)
|
||||||
: owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true)
|
: owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(const value_type& value)
|
json_ref(const value_type& value)
|
||||||
: value_ref(const_cast<value_type*>(&value)), is_rvalue(false)
|
: value_ref(const_cast<value_type*>(&value)), is_rvalue(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(std::initializer_list<json_ref> init)
|
json_ref(std::initializer_list<json_ref> init)
|
||||||
: owned_value(init), value_ref(&owned_value), is_rvalue(true)
|
: owned_value(init), value_ref(&owned_value), is_rvalue(true)
|
||||||
{}
|
{}
|
||||||
@ -11118,6 +11121,7 @@ class json_ref
|
|||||||
template <
|
template <
|
||||||
class... Args,
|
class... Args,
|
||||||
enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 >
|
enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 >
|
||||||
|
// cppcheck-suppress noExplicitConstructor
|
||||||
json_ref(Args && ... args)
|
json_ref(Args && ... args)
|
||||||
: owned_value(std::forward<Args>(args)...), value_ref(&owned_value),
|
: owned_value(std::forward<Args>(args)...), value_ref(&owned_value),
|
||||||
is_rvalue(true) {}
|
is_rvalue(true) {}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user