AP_GPS: Refactor get_singleton() to return a pointer

This commit is contained in:
Michael du Breuil 2019-04-04 23:21:03 -07:00 committed by Tom Pittenger
parent 35bd143532
commit 27ad9ac3ca
2 changed files with 3 additions and 3 deletions

View File

@ -1573,7 +1573,7 @@ namespace AP {
AP_GPS &gps()
{
return AP_GPS::get_singleton();
return *AP_GPS::get_singleton();
}
};

View File

@ -64,8 +64,8 @@ public:
AP_GPS(const AP_GPS &other) = delete;
AP_GPS &operator=(const AP_GPS&) = delete;
static AP_GPS &get_singleton() {
return *_singleton;
static AP_GPS *get_singleton() {
return _singleton;
}
// GPS driver types