Location: operator= uses const reference

This commit is contained in:
Randy Mackay 2016-04-28 20:54:40 +09:00
parent d6309a3a1a
commit 5161d63f8b
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ Location_Class::Location_Class(const Vector3f &ekf_offset_neu)
}
}
Location_Class& Location_Class::operator=(const struct Location loc)
Location_Class& Location_Class::operator=(const struct Location &loc)
{
lat = loc.lat;
lng = loc.lng;

View File

@ -37,7 +37,7 @@ public:
static void set_terrain(AP_Terrain* terrain) { _terrain = terrain; }
// operators
Location_Class& operator=(const struct Location loc);
Location_Class& operator=(const struct Location &loc);
// set altitude
void set_alt_cm(int32_t alt_cm, ALT_FRAME frame);