Browse Source

AP_GPS: unify singleton naming to _singleton and get_singleton()

master
Tom Pittenger 6 years ago committed by Tom Pittenger
parent
commit
5d66c3ed62
  1. 4
      libraries/AP_GPS/AP_GPS.cpp
  2. 2
      libraries/AP_GPS/AP_GPS.h

4
libraries/AP_GPS/AP_GPS.cpp

@ -561,7 +561,7 @@ AP_GPS::GPS_Status AP_GPS::highest_supported_status(uint8_t instance) const
bool AP_GPS::should_df_log() const bool AP_GPS::should_df_log() const
{ {
AP_Logger *instance = AP_Logger::instance(); AP_Logger *instance = AP_Logger::get_singleton();
if (instance == nullptr) { if (instance == nullptr) {
return false; return false;
} }
@ -1546,7 +1546,7 @@ namespace AP {
AP_GPS &gps() AP_GPS &gps()
{ {
return AP_GPS::gps(); return AP_GPS::get_singleton();
} }
}; };

2
libraries/AP_GPS/AP_GPS.h

@ -71,7 +71,7 @@ public:
AP_GPS(const AP_GPS &other) = delete; AP_GPS(const AP_GPS &other) = delete;
AP_GPS &operator=(const AP_GPS&) = delete; AP_GPS &operator=(const AP_GPS&) = delete;
static AP_GPS &gps() { static AP_GPS &get_singleton() {
return *_singleton; return *_singleton;
} }

Loading…
Cancel
Save