Skip to content

Commit

Permalink
core: fix deprecated-copy warning in GCC 9
Browse files Browse the repository at this point in the history
This fixes the warning that appeared with GCC 9:

core/system_impl.cpp:877:73: error:
implicitly-declared
‘dronecode_sdk::MAVLinkParameters::ParamValue::ParamValue(const
dronecode_sdk::MAVLinkParameters::ParamValue&)’ is deprecated
[-Werror=deprecated-copy]
  • Loading branch information
julianoes committed May 16, 2019
1 parent 88c77e5 commit 00ae76d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/mavlink_parameters.h
Expand Up @@ -24,9 +24,15 @@ class MAVLinkParameters {
public:
typedef char custom_type_t[128];

ParamValue &operator=(ParamValue value)
ParamValue() {}

ParamValue(ParamValue &rhs) { _value = rhs._value; }

ParamValue(const ParamValue &rhs) { _value = rhs._value; }

ParamValue &operator=(ParamValue rhs)
{
_value = value._value;
_value = rhs._value;
return *this;
}

Expand Down

0 comments on commit 00ae76d

Please sign in to comment.