AP_Param: fixed build warning

This commit is contained in:
Andrew Tridgell 2020-04-24 12:06:07 +10:00
parent 2ae31f9d76
commit bb87da628e
1 changed files with 3 additions and 0 deletions

View File

@ -769,7 +769,10 @@ public:
/// value separately, as otherwise the value in EEPROM won't be
/// updated correctly.
void set_and_save_ifchanged(const T &v) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
if (v == _value) {
#pragma GCC diagnostic pop
return;
}
set(v);